CRAN (R Programming Language)
   HOME

TheInfoList



OR:

R packages are
extensions Extension, extend or extended may refer to: Mathematics Logic or set theory * Axiom of extensionality * Extensible cardinal * Extension (model theory) * Extension (proof theory) * Extension (predicate logic), the set of tuples of values t ...
to the R statistical programming language. R packages contain code, data, and documentation in a standardised collection format that can be installed by users of R, typically via a centralised
software repository A software repository, or repo for short, is a storage location for Package format, software packages. Often a table of contents is also stored, along with metadata. A software repository is typically managed by source or version control, or rep ...
such as CRAN (the Comprehensive R Archive Network). The large number of packages available for R, and the ease of installing and using them, has been cited as a major factor driving the widespread adoption of the language in
data science Data science is an interdisciplinary academic field that uses statistics, scientific computing, scientific methods, processing, scientific visualization, algorithms and systems to extract or extrapolate knowledge from potentially noisy, stru ...
. Compared to
libraries A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
in other programming languages, R packages must conform to a relatively strict specification. The ''Writing R Extensions'' manual specifies a standard
directory structure In computing, a directory structure is the way an operating system arranges files that are accessible to the user. Files are typically displayed in a hierarchical tree structure. File names and extensions A filename is a string used to uniquely ...
for R source code, data, documentation, and package
metadata Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive ...
, which enables them to be installed and loaded using R's in-built
package management A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner. A package manager deals wi ...
tools. Packages distributed on CRAN must meet additional standards. According to John Chambers, whilst these requirements "impose considerable demands" on package developers, they improve the
usability Usability can be described as the capacity of a system to provide a condition for its users to perform the tasks safely, effectively, and efficiently while enjoying the experience. In software engineering, usability is the degree to which a softw ...
and long-term stability of packages for end users.


Repositories


Comprehensive R Archive Network (CRAN)

The Comprehensive R Archive Network (CRAN) is R's central
software repository A software repository, or repo for short, is a storage location for Package format, software packages. Often a table of contents is also stored, along with metadata. A software repository is typically managed by source or version control, or rep ...
, supported by the R Foundation. It contains an archive of the latest and previous versions of the R distribution, documentation, and contributed R packages. It includes both source packages and pre-
compiled In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
binaries A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document files ...
for
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
. , more than 16,000 packages are available. CRAN was created by Kurt Hornik and Friedrich Leisch in 1997, with the name paralleling other early packing systems such as
TeX Tex, TeX, TEX, may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Tex Earnhardt (1930–2020), U.S. businessman * Joe Tex (1933–1982), stage name of American soul singer ...
's
CTAN C mathematical operations are a group of functions in the C standard library, standard library of the C programming language implementing basic mathematical functions. Different C standards provide different, albeit backwards-compatible, sets of ...
(released 1992) and
Perl Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Perl was developed ...
's
CPAN The Comprehensive Perl Archive Network (CPAN) is a software repository of over 220,000 software modules and accompanying documentation for 45,500 distributions, written in the Perl programming language by over 14,500 contributors. ''CPAN'' can de ...
(released 1995). , it is still maintained by Hornik and a team of volunteers. The master site is located at the
Vienna University of Economics and Business The Vienna University of Economics and Business ( , WU) is a public research university in Vienna, Austria. The university received triple accreditation (AACSB, EQUIS and AMBA). History WU was founded on 1 October 1898 as '' k.u.k. Exportakade ...
and is
mirrored ''Mirrored'' is the debut studio album by American experimental rock band Battles. It was released on May 14, 2007 in the United Kingdom, and on May 22, 2007 in the United States. ''Mirrored'' marked the first album in which the band incorporate ...
on servers around the world. The "Task Views" page (subject list) on the CRAN website lists a wide range of tasks (in fields such as finance, genetics,
high performance computing High-performance computing (HPC) is the use of supercomputers and computer clusters to solve advanced computation problems. Overview HPC integrates systems administration (including network and security knowledge) and parallel programming into ...
,
machine learning Machine learning (ML) is a field of study in artificial intelligence concerned with the development and study of Computational statistics, statistical algorithms that can learn from data and generalise to unseen data, and thus perform Task ( ...
,
medical imaging Medical imaging is the technique and process of imaging the interior of a body for clinical analysis and medical intervention, as well as visual representation of the function of some organs or tissues (physiology). Medical imaging seeks to revea ...
,
meta-analysis Meta-analysis is a method of synthesis of quantitative data from multiple independent studies addressing a common research question. An important part of this method involves computing a combined effect size across all of the studies. As such, th ...
,
social sciences Social science (often rendered in the plural as the social sciences) is one of the branches of science, devoted to the study of society, societies and the Social relation, relationships among members within those societies. The term was former ...
and
spatial statistics Spatial statistics is a field of applied statistics dealing with spatial data. It involves stochastic processes (random fields, point processes), sampling, smoothing and interpolation, regional ( areal unit) and lattice ( gridded) data, poin ...
) for which R packages are available. Another way to browse CRAN packages is provided by Metacran, which also maintains lists of featured, most downloaded, trending or most depended upon packages. The number of CRAN packages has grown exponentially for many years, and an average of 21 submissions of new or updated packages were made every day. Since each submission is manually reviewed by a small team of CRAN maintainers, many of whom, according to R core developer
Peter Dalgaard Peter Dalgaard (born 1959) is a Danish statistician and one of the core developers of the R statistical programming language. He is a professor at Copenhagen Business School and was previously a professor of biostatistics at the University of Cope ...
, are "approaching pensionable age", there is a concern that this system is not sustainable in the long term. The growth of CRAN has exposed limitations of its dependency management infrastructure, particularly the fact that it assumes that dependencies always refer to the latest version of a package, meaning that new releases of CRAN packages must always be
backwards compatible In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with inpu ...
, and that CRAN packages cannot have dependencies that are not on CRAN. It has also led to concerns about declining quality of packages.


MRAN and Posit Package Manager

The Microsoft R Application Network (MRAN) is a mirror of CRAN maintained by
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
which is based on the company's downstream distribution of R,
Microsoft R Open Revolution Analytics (formerly REvolution Computing) is a statistical software company focused on developing open source and "open-core" versions of the free and open source software R (programming language), R for enterprise, academic and analyt ...
(formerly Revolution R Open). It also includes an archive of daily CRAN snapshots, branded as the "CRAN Time Machine", which enables users of MRAN to bypass the dependency versioning limitations of CRAN by installing a fixed set of R package versions via the package checkpoint. In January 2023 Microsoft announced that MRAN was being retired and the associated websites and repositories became unavailable in July 2023. The Posit Package Manager (formerly RStudio Package Manager) is a similar tool produced by the developers of
RStudio RStudio IDE (or RStudio) is an integrated development environment for R, a programming language for statistical computing and graphics. It's available in two formats: RStudio Desktop is a regular desktop application while RStudio Server runs ...
which, in addition to CRAN snapshots, includes an archive of R packages from Bioconductor and
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (prog ...
packages from the
Python Package Index The Python Package Index, abbreviated as PyPI () and also known as the Cheese Shop (a reference to the ''Monty Python's Flying Circus'' sketch "Cheese Shop sketch, Cheese Shop"), is the official third-party software repository for Python (progra ...
. It also distributes pre-compiled binary packages for Linux (only Windows and macOS binaries are included on CRAN).


Other repositories

The
Bioconductor Bioconductor is a free, open source and open development software project for the analysis and comprehension of genomic data generated by wet lab experiments in molecular biology. Bioconductor is based primarily on the statistical R programming ...
project provides R packages for the analysis of
genomic Genomics is an interdisciplinary field of molecular biology focusing on the structure, function, evolution, mapping, and editing of genomes. A genome is an organism's complete set of DNA, including all of its genes as well as its hierarchical, ...
data. This includes
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
data-handling and analysis tools for data from
Affymetrix Affymetrix is now Applied Biosystems, a brand of DNA microarray products sold by Thermo Fisher Scientific that originated with an American biotechnology research and development and manufacturing company of the same name. The Santa Clara, Calif ...
,
cDNA In genetics, complementary DNA (cDNA) is DNA that was reverse transcribed (via reverse transcriptase) from an RNA (e.g., messenger RNA or microRNA). cDNA exists in both single-stranded and double-stranded forms and in both natural and engin ...
microarray A microarray is a multiplex (assay), multiplex lab-on-a-chip. Its purpose is to simultaneously detect the expression of thousands of biological interactions. It is a two-dimensional array on a Substrate (materials science), solid substrate—usu ...
, and next-generation
high-throughput sequencing DNA sequencing is the process of determining the nucleic acid sequence – the order of nucleotides in DNA. It includes any method or technology that is used to determine the order of the four bases: adenine, thymine, cytosine, and guanine. The ...
methods. R-Forge, is a central platform for the collaborative development of R packages, R-related software, and projects. R-Forge also hosts many unpublished beta packages, and development versions of CRAN packages.


Base and recommended packages

R is distributed with fifteen "base packages": base, compiler, datasets, grDevices, graphics, grid, methods, parallel, splines, stats, stats4, tcltk, tools, translations, and utils. In addition, there are fifteen "recommended packages" from CRAN which are included with binary distributions of R: KernSmooth, MASS, Matrix, boot, class, cluster, codetools, foreign, lattice, mgcv, nlme, nnet, rpart, spatial, and survival.


Other packages

A group of packages called the
tidyverse The tidyverse is a collection of open source packages for the R programming language introduced by Hadley Wickham and his team that "share an underlying design philosophy, grammar, and data structures" of tidy data. Characteristic features of t ...
, which can be considered a "dialect of the R language", is increasingly popular in the R ecosystem. As of 15 May 2025, Metacran listed 6 of the 8 core packages of the tidyverse in the list of most downloaded R packages. The group of packages strives to provide a cohesive collection of functions to deal with common data science tasks, including
data import The import and export of data is the automated or semi-automated input and output of data sets between different software applications. It involves "translating" from the format used in one application into that used by another, where such translat ...
, cleaning, transformation and visualisation (notably with the
ggplot2 ggplot2 is an open-source data visualization R package, package for the Computational statistics, statistical programming language R (programming language), R. Created by Hadley Wickham in 2005, ggplot2 is an implementation of Leland Wilkinson ...
package). The R Infrastructure packages support coding and the development of R packages and as of 4 May 2021, Metacran lists 16 of these packages among the 25 most downloaded packages.


See also

*
tidyverse The tidyverse is a collection of open source packages for the R programming language introduced by Hadley Wickham and his team that "share an underlying design philosophy, grammar, and data structures" of tidy data. Characteristic features of t ...
*
ggplot2 ggplot2 is an open-source data visualization R package, package for the Computational statistics, statistical programming language R (programming language), R. Created by Hadley Wickham in 2005, ggplot2 is an implementation of Leland Wilkinson ...
*
knitr knitr is a software engine for dynamic report generation with R. It is a package in the programming language R that enables integration of R code into LaTeX, LyX, HTML, Markdown, AsciiDoc, and reStructuredText documents. The purpose of knitr is ...


References


Further reading

* * * * * *


External links


The Comprehensive R Archive Network (CRAN)

METACRAN
a directory of R packages
CRAN Task Views
listing of CRAN packages by topics
Microsoft R Application Network
(archived on the Wayback Machine) {{R (programming language) R (programming language)