R
Built by statisticians for statisticians, and it shows in both directions.
- First released
- 1993 (1.0 in 2000)
- Created by
- Ross Ihaka and Robert Gentleman, University of Auckland
- Typing
- Dynamic, with vectors rather than scalars as the primitive
- File extensions
- .R, .r, .Rmd
What it is for
R is for statistics done seriously. Other languages treat statistical work as a library concern; R treats it as the point. Data frames, factors, missing values and vectorized arithmetic are built in, and the modeling notation reads like the notation in a paper. If a method exists in the literature there is very often a CRAN package implementing it, not rarely written by the person who published it.
The other half is communication. ggplot2 is still the best implementation of a grammar of graphics anywhere, and R Markdown and Quarto make a reproducible document, code and output and prose in one file, routine rather than heroic. If your deliverable is a report, that pipeline is hard to beat.
The weakness is engineering. R is not the language to write a web service in, its performance characteristics surprise people, and there are at least three object systems. Most organizations end up with R doing the analysis and something else shipping it.
Where it came from
Ross Ihaka and Robert Gentleman started R at the University of Auckland in the early 1990s, as a free implementation of S, the statistical language John Chambers had been building at Bell Labs since 1976. The name is a joke on both S and the authors' initials. It became a GNU project in 1995 and reached 1.0 in February 2000.
CRAN opened in 1997 and is the reason R won its field. It insists on checking every submitted package against every other, on every platform. That is friction for authors and an unusually reliable archive for everyone else.
The tidyverse, driven largely by Hadley Wickham from around 2014, created a second dialect: dplyr, tidyr, ggplot2 and the pipe, sharing conventions and a philosophy of tidy data. Base R and the tidyverse coexist, and which one an R programmer learned first is usually obvious at a glance.
What it is like to type
R has the most distinctive keystroke here: the assignment arrow, <-, two characters that have to land in the right order. The pipe is the other signature motion, whether you write %>% or the newer |>. And arguments named with = mean you spend a lot of time around the equals key.
103 steps across 7 tours, from the basics to complete programs.
The tours
- Language basicsR does not really have scalars. 20 steps.
- Data frames in base RData frames before the tidyverse gets involved. 8 steps.
- StatisticsThe reason R exists. 11 steps.
- dplyrThe tour at the center of modern R. 27 steps.
- Reshaping & readingGetting data into the shape the rest of the tidyverse expects. 12 steps.
- Functional & text toolsFunctional programming and the string and date work that usually accompanies it. 10 steps.
- ggplot2Still the best implementation of a grammar of graphics anywhere, and the reason a lot of people put up with R. 15 steps.