Installing R and RStudio

Augustin Luna
26 January, 2016

Research Fellow
Department of Biostatistics and Computational Biology
Dana-Farber Cancer Institute

Topics to be Covered

  • R: Language Basics, Plotting, Getting Help
  • Using the RStudio Editor

What is R?

  • Free, open source
  • Started in 1993
  • Geared towards scientific computing
    • Created by Ross Ihaka and Robert Gentleman (statisticians)
  • Interpreted; similar to Python and MATLAB

Why is R Popular?

  • Free, open source
  • Interactive data analysis
    • Script-driven rather than menu-driven helps reproducibility
  • Flexible and powerful plotting support
  • Excellent package management system

R Package Management System

  • Large and growing collection of statistical analysis methods
  • Simple package installation; dependency management
  • R scripts usually portable to other platforms
  • Package repositories ensure functionality, documentation, and interoperability
  • Vignettes (tutorials) provided as runnable analyses
  • Large diversity of packages for data analysts
    • This presentation was produced with R packages

Extending R and Package Repositories

  • Comprehensive R Archive Network (CRAN)
    • 5,800 R packages (as of June 2014)
    • Many packages call C, C++, Fortran, or Java code for speedups
  • Bioconductor
    • 800+ R packages focused on bioinformatics
    • 50+ packages dedicated to pathway analysis
  • Devtools
    • R package that allows package installation from code repositories

RStudio

  • https://www.rstudio.com/
  • Available for Windows, OSX, and Linux
  • Simplifies common tasks: plotting, package installation, accessing files, viewing variables, etc.
  • Provides code-completion so users do not have to remember whole lists functions and tons parameters

Installing R and RStudio

YouTube Video Guides to Install R and RStudio

RStudio Overview