How to cite R starts with one line of code: citation(), typed into your R console. That command prints the official reference for the R Foundation for Statistical Computing, and you then reshape that reference into APA, MLA, or Chicago format depending on what your instructor or journal requires. This guide shows the exact citation() output, walks through each style one by one, and explains how to cite individual R packages separately from the base software.
Why You Should Cite R and R Packages
R is free, open-source software built and maintained largely by volunteer developers and academic researchers. Package authors rarely get paid for their work, so a citation in your reference list is often the only public credit they receive. Citing R and the packages you used also documents exactly which tools produced your results, which matters if a reader wants to check your method or repeat your analysis. The rOpenSci community’s primer on citing R packages goes into more depth on why developer credit and repeatable science both depend on this habit.
Note: Citing R and its packages does more than acknowledge the software. It creates a paper trail that lets other researchers repeat your analysis using the same tools and the same package versions you used.
Most instructors expect you to cite R itself once, plus any package that did meaningful work in your analysis, such as a statistical test, a plotting library, or a data-import package. General-purpose packages you barely touched are usually optional, but check your course or journal’s own source citation rules if you are unsure where the line falls.
A complete software citation, in any style, should include:
- The author or organization credited by
citation(), usually the R Foundation or the package’s maintainer - The publication year shown in the citation output
- The full software title, italicized
- The version number, from
packageVersion()orversion$version.string - A URL or DOI pointing back to the software
How to Find R’s Official Citation
Open R or RStudio and run the built-in citation function. It prints a ready-made reference along with a BibTeX entry for LaTeX users.
citation()
To cite R in publications use:
R Core Team (2025). R: A language and environment for statistical
computing. R Foundation for Statistical Computing, Vienna, Austria.
URL https://www.R-project.org/.
To cite a specific package instead of base R, pass the package name as text to the same function, then check the version you installed with packageVersion().
citation("ggplot2")
packageVersion("ggplot2")
Good example: R Core Team. (2025). R: A language and environment for statistical computing (Version 4.4.2) [Computer software]. R Foundation for Statistical Computing. https://www.R-project.org/
Bad example: “Data was analyzed using R (www.r-project.org).” This drops the author, the year, and the software title, so a reader cannot find the source or confirm which version you ran.
How to Cite R in APA Style
APA 7th edition treats R as software, so the reference list entry follows the same author-date pattern APA uses for any other source. Review the official APA author-date guidelines if you want the full rule set behind this format.
Reference list entry:
R Core Team. (2025). R: A language and environment for statistical computing (Version 4.4.2) [Computer software]. R Foundation for Statistical Computing. https://www.R-project.org/
In-text citation:
(R Core Team, 2025)
If you would rather build the entry automatically, essayreply’s APA citation generator formats the reference list entry and the in-text citation for you once you enter the software name and version. Need a title page for the same paper? The APA title page generator formats that in a few clicks too.
How to Cite R in MLA Style
MLA 9th edition treats software as a container, similar to a website or an app. The MLA style center’s guidance on citing source code covers the same logic for programs and scripts.
Works Cited entry:
R Core Team. R: A Language and Environment for Statistical Computing, version 4.4.2, R Foundation for Statistical Computing, 2025, www.r-project.org.
In-text citation:
(R Core Team)
essayreply’s MLA citation generator can also assemble this entry if you would rather not format it by hand.
How to Cite R in Chicago Style
Chicago’s notes-bibliography system uses a footnote plus a matching bibliography entry, while the author-date system pairs an in-text citation with a reference list entry similar to APA’s. Pick whichever your instructor or publisher specifies.
Bibliography entry:
R Core Team. R: A Language and Environment for Statistical Computing. Vienna: R Foundation for Statistical Computing, 2025. https://www.r-project.org/.
Footnote:
1. R Core Team, R: A Language and Environment for Statistical Computing (Vienna: R Foundation for Statistical Computing, 2025), https://www.r-project.org/.
essayreply’s Chicago citation generator handles the author-date variant automatically.
Citing Specific R Packages
Base R and the packages you load are cited separately because each one has its own author, version, and sometimes its own published paper. Some package citations point to a journal article rather than the software itself, in which case you cite it the same way you would cite a journal article.
| Style | Citing base R | Citing the ggplot2 package |
|---|---|---|
| APA | R Core Team. (2025). R [Computer software]. R Foundation for Statistical Computing. | Wickham, H. (2016). ggplot2: Elegant graphics for data analysis. Springer-Verlag New York. |
| MLA | R Core Team. R: A Language and Environment for Statistical Computing, R Foundation for Statistical Computing, 2025. | Wickham, Hadley. ggplot2: Elegant Graphics for Data Analysis, Springer-Verlag, 2016. |
| Chicago | R Core Team. R: A Language and Environment for Statistical Computing. Vienna: R Foundation for Statistical Computing, 2025. | Wickham, Hadley. ggplot2: Elegant Graphics for Data Analysis. New York: Springer-Verlag, 2016. |
Run citation("packagename") for the package you actually used. Some developers list a book, others list a journal article, and a few simply point back to the software itself, so always copy what the function returns rather than guessing at the format. Wickham’s ggplot2 reference above points to a published book, so you would format that entry the same way you’d cite any other book in your reference list.
What About Base R Packages Like stats, utils, or graphics?
R ships with a set of built-in packages, including stats, utils, graphics, and base itself, that load automatically every time you start R. These do not need a separate citation beyond the main R reference, since they are part of the core software rather than add-ons you installed. Run citation("stats") if you want to confirm, and you will usually see it point back to the same R Core Team reference used for base R.
The distinction that matters for your reference list is whether you had to run install.packages() to get a package. If you installed it separately, from CRAN, Bioconductor, or GitHub, it gets its own citation. If it came bundled with R, one citation for R itself covers it.
How to Cite R in a Reference Manager
If you use Zotero, EndNote, or Mendeley, you rarely have to retype a citation by hand. Copy the BibTeX entry that citation() prints below the plain-text reference, then import it directly into your reference manager’s library.
@Manual{,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2025},
url = {https://www.R-project.org/},
}
Many R packages published through the Journal of Open Source Software or a similar outlet also carry a DOI. When a package citation includes a DOI, use that instead of a plain URL. A DOI is a permanent link, so it survives even if the package’s website moves or its maintainer changes hosts. essayreply’s citation generator accepts a DOI directly if you would rather paste it than build the reference by hand.
Common Mistakes When Citing R
Bad example: Citing “RStudio” when you mean the R language, or citing R once and skipping every package that shaped your results.
Good example: Cite R itself, cite RStudio separately if you used its own citation from the Help menu, and cite each package that played a real role in your analysis, with the version number included.
Leaving out the version number is the single most common gap reviewers flag, since R and its packages update often enough that results can shift between releases. Check the version with version$version.string for R itself, or packageVersion("name") for any package.
Before you submit, confirm that:
- R itself is cited at least once, with a version number
- Every package that shaped your results has its own citation
- Your reference list format matches your assigned style, checked against your paper’s overall formatting guide
- Any DOI or URL in your references actually resolves to the right page
Frequently Asked Questions
Do I need to cite R itself, or just the packages I used?
Cite both. R is the software environment your analysis ran in, and each package is a separate piece of software with its own author. Reviewers and instructors expect to see R cited at least once, plus any package that meaningfully shaped your results.
What if my package doesn’t have a specific citation?
Run citation("packagename") anyway. Even packages without a published paper usually return a software-style reference generated from the package’s own description file, listing the author, version, and a URL. If it points to a blog post or a maintainer’s site instead, cite it the way you would cite any other web article.
How do I find the version of R I’m using?
Type version$version.string into the console, or check devtools::session_info() for a full list of R and package versions used in your session.
Is citing R different for RStudio?
Yes. RStudio is a separate application from R, so it gets its own citation if you want to credit it. RStudio’s own Help menu includes a “Cite RStudio” option that generates the correct reference text.