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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Special References
Aragon TJ (2011) Applied epidemiology using R (epir). UC Berkeley School of Public Health, and San Francisco Department of Public Health, Berkeley
BMI Notes (2012) Body mass index. http://en.wikipedia.org/wiki/Body_mass_index
Centers for Disease Control and Prevention (2005) Antiretroviral postexposure Prophylaxis after sexual, injection-drug use, or other nonoccupational exposure to HIV in the United States: recommendations from the U.S. Department of Health and Human Services. MMWR Recomm Rep 54(RR-2):1–20 Available from: http://www.cdc.gov/mmwr/preview/mmwrhtml/rr5402a1.htm
CRAN, The comprehensive R archive network: http://cran.r-project.org/
Dalgaard P (2002) Introductory statistics with R, Springer statistics and computing series, Springer, New York
Daniel WW (2005) Biostatistics – a foundation for analysis in the health sciences. Wiley, New York
Everitt BS, Hothorn T (2006) A handbook of statistical analysis using R. Chapman & Hall/CRC, Boca Raton
Statistician Job Search http://jobs.amstat.org/jobs/4627784/biostatistician-1
Statistics Canada http://www.statcan.gc.ca/edu/power-pouvoir/ch3/5214785- eng.htm#a1
Teetor P (2011) R Cookbook. O’Reilly Media, Sebastopol
Venables WN, Smith DM, and the R Development Core Team (2004) An introduction to R. Network Theory, Ltd., Bristol
Virasakdi C (n.d.) Analysis of epidemiological data using R and Epicalc. Epidemiology unit, Prince of Songkla University, Thailand: cvirasak@medicine.psu.ac.th
Author information
Authors and Affiliations
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
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this chapter
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
DOI: https://doi.org/10.1007/978-3-319-93791-5_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-93790-8
Online ISBN: 978-3-319-93791-5
eBook Packages: Biomedical and Life SciencesBiomedical and Life Sciences (R0)