Skip to main content

Data Analysis Using R Programming

  • Chapter
  • First Online:
Biostatistics for Human Genetic Epidemiology

Part of the book series: Advances in Experimental Medicine and Biology ((AEMB,volume 1082))

Abstract

Beginning R

R is an open-source, freely available, integrated software environment for data manipulation, computation, analysis, and graphical display. The R environment consists of

  • *a data handling and storage facility,

  • *operators for computations on arrays and matrices,

  • *a collection of tools for data analysis

  • *graphical capabilities for analysis and display, and

  • *an efficient, and continuing developing programming algebra-like programming language which consists of loops, conditionals, user-defined functions, and input and output capabilities.

Many R programs are available for biostatistical analysis in Genetic Epidemiology. Typical examples are shown.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Special References

Download references

Author information

Authors and Affiliations

Authors

Appendix 1

Appendix 1

2.1.1 Documentation for the plot function

plot {graphics}

R Documentation

Generic X-Y Plotting

2.1.1.1 Description

Generic function for plotting of R objects. For more details about the graphical parameter arguments, see par.

For simple scatter plots, plot.default will be used. However, there are plot methods for many R objects, including functions, data.frames, density objects, etc. Use methods(plot) and the documentation for these.

2.1.1.2 Usage

plot(x, y, …)

2.1.1.3 Arguments

X

the coordinates of points in the plot. Alternatively, a single plotting

structure, function or any R object with a plot method can be provided.

Y

the y coordinates of points in the plot, optional if x is an appropriate

structure.

2.1.1.4 Details

The two step types differ in their x-y preference: Going from (x1,y1) to (x2,y2) with x1 < x2, type = “s” moves first horizontal, then vertical, whereas type = “S” moves the other way around.

2.1.1.5 See Also

plot.default, plot.formula and other methods; points, lines, par.

For X-Y-Z plotting see contour, persp and image.

2.1.1.6 Examples

require(stats) plot(cars) lines(lowess(cars)) plot(sin, -pi, 2*pi) # see ?plot.function ## Discrete Distribution Plot: plot(table(rpois(100,5)), type = “h”, col = “red”,lwd=10, main=”rpois(100,lambda=5)”) ## Simple quantiles/ECDF, see ecdf() {library(stats)} for a better one: plot(x <- sort(rnorm(47)), type = “s”, main = “plot(x, type = \”s\”)”) points(x, cex = .5, col = “dark red”)

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Chan, B.K.C. (2018). Data Analysis Using R Programming. In: Biostatistics for Human Genetic Epidemiology. Advances in Experimental Medicine and Biology, vol 1082. Springer, Cham. https://doi.org/10.1007/978-3-319-93791-5_2

Download citation

Publish with us

Policies and ethics