Introduction to R
R is a free, open-source language and environment for statistical computing, data analysis, and graphics.
1.1 What is R?
R is a free, open-source language and environment for statistical computing, data analysis, and graphics. It is:
Vectorized — operations apply to whole vectors at once.
Functional — functions are first-class objects; lazy evaluation of arguments.
Dynamically typed and interpreted (with a byte-code compiler).
Object-oriented in several flavors (S3, S4, R6, S7).
Backed by CRAN (20,000+ packages), Bioconductor (2,000+ bioinformatics packages), and GitHub/R-universe.
1.2 History
S language created at Bell Labs (John Chambers) Ross Ihaka & Robert Gentleman start R at the University of Auckland R released under the GPL R Core Team formed; CRAN founded RStudio IDE released dplyr; "tidyverse" ideas take shape (Hadley Wickham)
R 4.1: native pipe |> and lambda shorthand \(x) RStudio renamed Posit; Quarto released
Positron IDE, S7 OOP system, webR (R in the browser), R 4.4–4.5
1.3 Who uses R?
Statisticians, data scientists, epidemiologists, bioinformaticians, economists, social scientists. Organizations: Google, Meta, Microsoft, the FDA (submissions), the CDC, the NHS, Pfizer, Roche, the BBC, the New York Times (graphics), central banks, and most universities.
1.4 Why learn R?
Unmatched breadth of statistical methods (often published first as R packages).
World-class visualization (ggplot2).
Reproducible reporting (Quarto/R Markdown).
Interactive apps without web expertise (Shiny).
Huge, friendly community (#rstats, R-Ladies, Posit Community).