Standard Library Reference, Functions & Ready-to-Run Code Examples
Part of The Direct Path to Linux Ubuntu
— free for all students and developers.
R is the language of statisticians. Built-in support for data frames, statistical tests, and plotting — no libraries needed for basics.
ggplot2's grammar of graphics produces publication-quality charts in a few lines that would take pages of code in other languages.
Linear models, time series, clustering, PCA, ANOVA — R has built-in functions for virtually every statistical method ever invented.
The tidyverse, caret, Shiny, bioconductor — R's ecosystem covers every data science domain from genomics to finance.
Run a R program:
Rscript script.R # run R script from command line
R # start interactive R console
R --no-save < script.R # run script non-interactively
Rscript -e 'cat("Hi\n")' # one-liner
install.packages("dplyr") # install CRAN package
library(dplyr) # load installed package
install.packages("tidyverse") # install all tidyverse packages
rmarkdown::render("doc.Rmd") # render R Markdown to HTML
shiny::runApp("app.R") # start Shiny web application