George G. Vega Yon
University of Southern California
Department of Preventive Medicine
July 7th, 2018
We will be using:
R (of course), and you can get it from https://cloud.r-project.org/
RStudio (highly recommended), an IDE for R, and you can get if from https://www.rstudio.com/products/rstudio/
Materials for this presentation (including the presentation itself) can be downloaded from https://github.com/USCbiostats/intro2r-hcp-edition
Free software oriented for statistical computing and graphics (although people use for everything now a days)
Is maintain mostly by the R Core Team (about 20 members worldwide), with the support of The R Foundation
Has a thriving community of users and developers worldwide:
Institutional support from: rOpenSci, R Consortium, etc.
About 13,000 packages(libraries) on CRAN (The Comprehensive R Archive Network)
More than 1,000 attendees in useR!2017 conference
R (R Core Team 2018) is an implementation of the S (Statistics) programming language, which was created in 1976 by John Chambers while at Bell Labs.
R itself was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand. First release in 1995.
Currently developed by the R Development Core Team, of which Chambers is a member.
(Source wiki)
In R, if you want to:
Know about the sqrt
function? ?sqrt
, or help("sqrt")
Know about the makeCluster
function in the R package parallel
? ?parallel::makeCluster
, or help("makeCluster", package="parallel")
Know about the Regular Expressions? ??"Regular Expressions"
, or help.search("Regular Expressions")
See a full list of the functions and help files available in the package boot
: help(package="boot")
.
Look at more in deph information about the Matrix package? vignette(package="Matrix")
Checkout the CRAN Task Views
Take a look at the rstats tag on StackOverflow.com
Visit the r-bloggers.com website
Read one of the dozens of online free books about R created with the R package bookdown at bookdown.org
Ask a question on twitter using the #rstats hashtag.
The art of R programming https://nostarch.com/artofr.htm (Matloff 2011)
Advanced R http://adv-r.had.co.nz/ (Wickham 2015)
R Programming for Data Science https://bookdown.org/rdpeng/rprogdatascience/ (Peng 2012)
R for Data Science http://r4ds.had.co.nz/ (Wickham and Grolemund 2016)
Scientific Programming and Simulation using R (Jones, Maillardet, and Robinson 2009)
Using the stats
package, How can you estimate a generalized linear model in R?
What is the command to transpose a matrix in R? What about the command for inverting a matrix?
Looking at CRAN task Views, what R packages are available for convex optimization? What about stochastic optimization?
Create a list of R packages that provide wrappers for working with Slurm.
What does return the function for fitting nonlinear least squares in the stats
package?
Jones, O., R. Maillardet, and A. Robinson. 2009. Introduction to Scientific Programming and Simulation Using R. Chapman & Hall/Crc the R Series. CRC Press. https://books.google.com/books?id=gnZC525wnzIC.
Matloff, N. 2011. The Art of R Programming: A Tour of Statistical Software Design. No Starch Press Series. No Starch Press. https://books.google.com/books?id=o2aLBAAAQBAJ.
Peng, R. 2012. R Programming for Data Science. Lulu.com. https://books.google.com/books?id=GSePDAEACAAJ.
R Core Team. 2018. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
Wickham, H. 2015. Advanced R. Chapman & Hall/Crc the R Series. CRC Press. https://books.google.com/books?id=FfsYCwAAQBAJ.
Wickham, H., and G. Grolemund. 2016. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. O’Reilly Media. https://books.google.com/books?id=vfi3DQAAQBAJ.