Written and maintained by CASRAI Editorial Board
Published
On this page
Short answer: R is a free language and environment for statistical computing and graphics. It began at the University of Auckland, descends from the S language, and is maintained today by the R Core Team under the R Foundation for Statistical Computing. This page explains what R is, where it came from, how it relates to S, CRAN and RStudio, and how to cite it correctly. Facts below were read from the R Project’s About page and the R FAQ on 2026-11-08.
What is R?
The R Project describes R as “a language and environment for statistical computing and graphics.” It provides a wide range of statistical and graphical techniques, can be extended through add-on packages, and can link to code written in C, C++ and Fortran that is called at run time. Publication-quality plots are named as one of its strengths (R Project, About R, read 2026-11-08).
In practice this means R is both an interactive environment (you type a command, you see a result) and a programming language (you save commands in a script and run them again). The script is what makes an analysis repeatable. For the research tasks R is used for, see what R programming is used for.
Where did R come from?
According to the R FAQ (section 2.1), R was initially written by Ross Ihaka and Robert Gentleman at the Department of Statistics of the University of Auckland. Its design was heavily influenced by the S language of Becker, Chambers and Wilks, and since mid-1997 the R Core Team has been able to modify the source (R FAQ, read 2026-11-08).
R, S and S-PLUS
S-PLUS is a commercial implementation of S sold by TIBCO. R implements the S language but is not identical to it: the FAQ (sections 3.2 and 3.3) notes intentional differences, so S code does not always run unchanged in R.
Is R free? Licence and what it means for research
R is Free Software under the Free Software Foundation’s GNU General Public License; the FAQ (section 2.11) states it is released under GPL version 2 or version 3. For a research team this has a practical effect: anyone can install the same program, and an analysis script can be shared and re-run without a licence being involved. That supports reproducibility, because the script itself is the record of what was done to the data.
The pieces people confuse
| Term | What it is | Source |
|---|---|---|
| R | The language and the program that runs it | R Project, About R |
| CRAN | The Comprehensive R Archive Network: a collection of sites carrying identical material, including the R distribution, packages, documentation and binaries | R FAQ 2.10 |
| S | The earlier language that influenced R’s design | R FAQ 2.1 |
| S-PLUS | A TIBCO commercial version of S | R FAQ 3.2 |
| RStudio | A separate program from Posit that gives R a console, editor and plot pane; it does not include R | CASRAI install guide, from CRAN and Posit pages read 2026-11-07 |
Install or access (official source only)
Download R from CRAN (cran.r-project.org); the R Project site links to it. Step-by-step instructions for Windows, macOS and Ubuntu, including the RStudio install, are in how to install R and RStudio. Install R first, then RStudio if you want an editor.
A first session
These commands are base R and need no add-on packages. Type each into the R console (or an R script) and press Enter.
x <- c(2, 4, 6, 8)creates a vector namedxholding four numbers. The arrow<-assigns a value to a name. See what a vector is in R.mean(x)prints[1] 5.sd(x)prints the sample standard deviation,[1] 2.581989.summary(x)prints the five-number summary plus the mean.plot(x)draws a basic scatter plot of the values against their position.citation()prints how to cite R.
Output and how to read it
The [1] at the start of a line is the index of the first value on that line, not part of the result. summary(x) returns:
Min. 1st Qu. Median Mean 3rd Qu. Max.
2.0 3.5 5.0 5.0 6.5 8.0
Min. and Max. are the smallest and largest values; the 1st and 3rd quartiles are the values a quarter and three quarters of the way through the sorted data (R interpolates between observations, hence 3.5 and 6.5); Median and Mean are the middle value and the average. Once data sit in tables rather than single vectors, you will work with data frames: see data frames in R and R data types.
How do I cite R?
The R FAQ (section 2.8) says to cite R with the author “R Core Team” and the organisation R Foundation for Statistical Computing, using the year of the release of the version you actually used. Run citation() inside R to get the entry for your installed version, and cite add-on packages the same way with citation("packagename"). Recording the version in your methods section is part of making the analysis repeatable.
Troubleshooting
- Error: could not find function. The function belongs to an add-on package that is not installed or not loaded. See how to install R packages.
- Error: object not found. The name was never assigned in this session, or it is spelled with different capitalisation; R is case-sensitive.
- The console shows
+instead of>. R is waiting for the command to be completed, usually an unclosed bracket or quote. Finish it.
Free alternatives and neighbours
R’s own FAQ places it in the S family; other statistical tools have different licences and interfaces. For a point-by-point comparison with a commercial package, see R vs Stata. For a menu-driven way into R, see R Commander.
FAQ
What is R statistical programming language?
It is a free language and environment for statistical computing and graphics, released under the GNU General Public License and extended through add-on packages (R Project, About R).
Who created R?
Ross Ihaka and Robert Gentleman, at the Department of Statistics of the University of Auckland (R FAQ 2.1).
Is R the same as RStudio?
No. R is the language and program; RStudio is a separate editor from Posit that needs R installed.
Is R the same as S or S-PLUS?
No. R implements the S language with intentional differences; S-PLUS is a TIBCO commercial version of S (R FAQ 3.2, 3.3).
Sources
- R Project, What is R?, read 2026-11-08.
- R Project, R FAQ (sections 2.1, 2.8, 2.10, 2.11, 3.2, 3.3), read 2026-11-08.







