Skip to main content

R

R is built for statistical computing and data analysis. It is especially useful when the work already lives in data frames, formulas, statistical models, or publication-quality plots.

Start here​

  1. R basics covers vectors, data frames, control flow, and functions.
  2. Data import covers delimited text, spreadsheets, JSON, RDS, and RData.
  3. Use the built-in help before searching the web:
?mean
help("lm")
vignette(package = "dplyr")

?mean and help("lm") work with a standard R installation. The vignette example requires dplyr to be installed; vignette() lists vignettes from installed packages. For a specific call, read its arguments and return value, then run the smallest example before applying it to your data.

A small working stack​

NeedStart with
language and standard librarybase R
tabular transformationdplyr or data.table
plottingggplot2
delimited filesreadr or data.table::fread()
spreadsheetsreadxl
reproducible reportsQuarto
package developmentdevtools, usethis, and testthat

This is a starting set, not a claim that one package is the permanent default. Existing projects, data size, team conventions, and deployment constraints should decide the final stack.

Primary references​

Community posts are useful for examples, but package documentation and reproducible code should settle questions about current behavior.

Explore connectionsOpen network