HOME

TheInfoList



OR:

R is a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming l ...
for statistical computing and graphics supported by the R Core Team and the R Foundation for Statistical Computing. Created by statisticians Ross Ihaka and Robert Gentleman, R is used among data miners,
bioinformaticians Bioinformatics () is an interdisciplinary field that develops methods and software tools for understanding biological data, in particular when the data sets are large and complex. As an interdisciplinary field of science, bioinformatics combine ...
and
statistician A statistician is a person who works with theoretical or applied statistics. The profession exists in both the private and public sectors. It is common to combine statistical knowledge with expertise in other subjects, and statisticians may wor ...
s for
data analysis Data analysis is a process of inspecting, cleansing, transforming, and modeling data with the goal of discovering useful information, informing conclusions, and supporting decision-making. Data analysis has multiple facets and approaches, en ...
and developing statistical software. Users have created packages to augment the functions of the R language. According to user surveys and studies of scholarly literature databases, R is one of the most commonly used programming languages used in data mining. R ranks 12th in the TIOBE index, a measure of programming language popularity, in which the language peaked in 8th place in August 2020. The official R software environment is an open-source
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, ...
environment within the GNU package, available under the
GNU General Public License The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end user In product development, an end user (sometimes end-user) is a person who ultimately uses or is intended to ulti ...
. It is written primarily in C, Fortran, and R itself (partially self-hosting). Precompiled executables are provided for various
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s. R has a command line interface. Multiple third-party graphical user interfaces are also available, such as RStudio, an
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
, and Jupyter, a notebook interface.


History

R is an open-source implementation of the S programming language combined with lexical scoping semantics from Scheme, which allow objects to be defined in predetermined blocks rather than the entirety of the code. S was created by Rick Becker, John Chambers, Doug Dunn, Jean McRae, and Judy Schilling at
Bell Labs Nokia Bell Labs, originally named Bell Telephone Laboratories (1925–1984), then AT&T Bell Laboratories (1984–1996) and Bell Labs Innovations (1996–2007), is an American industrial research and scientific development company owned by mult ...
around 1976. Designed for statistical analysis, the language is an interpreted language whose code could be directly run without a
compiler 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 ...
. Many programs written for S run unaltered in R. As a dialect of the
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lispi ...
language, Scheme was created by
Gerald J. Sussman Gerald Jay Sussman (born February 8, 1947) is the Panasonic Professor of Electrical Engineering at the Massachusetts Institute of Technology (MIT). He received his S.B. and Ph.D. degrees in mathematics from MIT in 1968 and 1973 respectively. ...
and Guy L. Steele Jr. at MIT around 1975. In 1991, statisticians Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand, embarked on an S implementation. It was named partly after the first names of the first two R authors and partly as a play on the name of S. They began publicizing it on the data archive StatLib and the ''s-news'' mailing list in August 1993. In 1995, statistician Martin Mächler convinced Ihaka and Gentleman to make R free and open-source software under the
GNU General Public License The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end user In product development, an end user (sometimes end-user) is a person who ultimately uses or is intended to ulti ...
. The first official release came in June 1995. The first official "stable beta" version (v1.0) was released on 29 February 2000. The
Comprehensive R Archive Network R packages are extensions 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 such a ...
(CRAN) was officially announced on 23 April 1997. CRAN stores R's executable files, source code, documentations, as well as packages contributed by users. CRAN originally had 3 mirrors and 12 contributed packages. As of January 2022, it has 101 mirrors and 18,728 contributed packages. In addition to hosting packages CRAN hosts binaries for major distributions of Linux, MacOS and Windows. The R Core Team was formed in 1997 to further develop the language. , it consists of Chambers, Gentleman, Ihaka, and Mächler, plus statisticians Douglas Bates, Peter Dalgaard,
Kurt Hornik Kurt is a male given name of Germanic or Turkish origin. ''Kurt'' or ''Curt'' originated as short forms of the Germanic Conrad, depending on geographical usage, with meanings including counselor or advisor. In Turkish, Kurt means "Wolf" and is ...
, Michael Lawrence, Friedrich Leisch, Uwe Ligges, Thomas Lumley, Sebastian Meyer, Paul Murrell, Martyn Plummer,
Brian Ripley Brian David Ripley FRSE (born 29 April 1952) is a British statistician. From 1990, he was professor of applied statistics at the University of Oxford and is also a professorial fellow at St Peter's College. He retired August 2014 due to ill he ...
, Deepayan Sarkar, Duncan Temple Lang,
Luke Tierney Luke Tierney is an American statistician and computer scientist. A fellow of the Institute of Mathematical Statistics since 1988 and of the American Statistical Association since 1991, Tierney is currently a professor of statistics at the Univers ...
, and Simon Urbanek, as well as computer scientist Tomas Kalibera. Stefano Iacus, Guido Masarotto, Heiner Schwarte, Seth Falcon, Martin Morgan, and Duncan Murdoch were members. In April 2003, the R Foundation was founded as a non-profit organization to provide further support for the R project.


Features


Data processing

R's data structures include vectors, arrays,
lists A ''list'' is any set of items in a row. List or lists may also refer to: People * List (surname) Organizations * List College, an undergraduate division of the Jewish Theological Seminary of America * SC Germania List, German rugby union ...
, and data frames. Vectors are ordered collections of values and can be mapped to arrays of one or more dimensions in a column major order. That is, given an ordered collection of dimensions, one fills in values along the first dimension first, then fill in one-dimensional arrays across the second dimension, and so on. R supports array arithmetics and in this regard is like languages such as APL and
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementa ...
. The special case of an array with two dimensions is called a
matrix Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** '' The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
. Lists serve as collections of objects that do not necessarily have the same data type. Data frames contain a list of vectors of the same length, plus a unique set of row names. R has no scalar data type. Instead, a scalar is represented as a length-one vector. R and its libraries implement various statistical techniques, including linear, generalized linear and nonlinear modeling, classical statistical tests,
spatial Spatial may refer to: *Dimension *Space *Three-dimensional space Three-dimensional space (also: 3D space, 3-space or, rarely, tri-dimensional space) is a geometric setting in which three values (called ''parameters'') are required to determ ...
and time-series analysis, classification, clustering, and others. For computationally intensive tasks, C, C++, and Fortran code can be linked and called at run time. Another of R's strengths is static graphics; it can produce publication-quality graphs that include mathematical symbols.


Programming

R is an interpreted language; users can access it through a
command-line interpreter A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive command (computing), commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invokin ...
. If a user types 2+2 at the R command prompt and presses enter, the computer replies with 4. R supports
procedural programming Procedural programming is a programming paradigm, derived from imperative programming, based on the concept of the '' procedure call''. Procedures (a type of routine or subroutine) simply contain a series of computational steps to be carri ...
with functions and, for some functions,
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
with generic functions. Due to its S heritage, R has stronger
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
facilities than most statistical computing languages. Extending it is facilitated by its lexical scoping rules, which are derived from Scheme. R uses S-expressions to represent both data and code. R's extensible object system includes objects for (among others): regression models, time-series and geo-spatial coordinates. Advanced users can write C, C++,
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
, .NET or Python code to manipulate R objects directly. Functions are first-class objects and can be manipulated in the same way as data objects, facilitating meta-programming that allows multiple dispatch. Function arguments are passed by value, and are lazy—that is to say, they are only evaluated when they are used, not when the function is called. A generic function acts differently depending on the classes of the arguments passed to it. In other words, the generic function dispatches the method implementation specific to that object's class. For example, R has a generic print function that can print almost every class of object in R with print(objectname). Many of R's standard functions are written in R, which makes it easy for users to follow the algorithmic choices made. R is highly extensible through the use of packages for specific functions and specific applications.


Packages

R's capabilities are extended through user-created ''packages'', which offer statistical techniques, graphical devices, import/export, reporting ( RMarkdown,
knitr knitr is an 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 to allo ...
,
Sweave Sweave is a function in the statistical programming language R that enables integration of R code into LaTeX or LyX documents. The purpose is "to create dynamic reports, which can be updated automatically if data or analysis change". The data anal ...
), etc. These packages and their easy installation and use has been cited as driving the language's widespread adoption in data science. The packaging system is also used by researchers to organize research data, code and report files in a systematic way for sharing and archiving. Multiple packages are included with the basic installation. Additional packages are available on CRAN, Bioconductor, R-Forge, Omegahat,
GitHub GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, co ...
, and other repositories. The "Task Views" on the CRAN website lists packages in fields including Finance, Genetics, High Performance Computing, Machine Learning, Medical Imaging,
Meta-Analysis A meta-analysis is a statistical analysis that combines the results of multiple scientific studies. Meta-analyses can be performed when there are multiple scientific studies addressing the same question, with each individual study reporting m ...
, Social Sciences and Spatial Statistics. R has been identified by the FDA as suitable for interpreting data from clinical research. Microsoft maintains a daily snapshot of CRAN that dates back to Sept. 17, 2014. Other R package resources include R-Forge, a platform for the collaborative development of R packages. The Bioconductor project provides packages for genomic data analysis, including object-oriented data-handling and analysis tools for data from Affymetrix, cDNA microarray, and next-generation high-throughput sequencing methods. A group of packages called the Tidyverse, which can be considered a "dialect" of the R language, is increasingly popular among developers.Metacran
listed 7 of the 8 core packages of the Tidyverse in the list of most download R packages.
It strives to provide a cohesive collection of functions to deal with common data science tasks, including data import, cleaning, transformation and visualisation (notably with the ggplot2 package). Dynamic and interactive graphics are available through additional packages. R is one of 5 languages with an Apache Spark API, along with Scala,
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
, Python, and SQL.


Milestones

A list of changes in R releases is maintained in various "news" files at CRAN.Changes in versions 3.0.0 onward: Earlier change logs (by major release number): * * * * * Some highlights are listed below for several major releases.


Interfaces

Various applications can be used to edit or run R code. Early developers preferred to run R via the command line console, succeeded by those who prefer an IDE. IDEs for R include (in alphabetical order
R.app
(OSX/macOS only), Rattle GUI, R Commander, RKWard, RStudio, and Tinn-R. R is also supported in multi-purpose IDEs such as Eclipse via the StatET plugin, and Visual Studio via the R Tools for Visual Studio. Of these, RStudio is the most commonly used. Statistical frameworks which use R in the background include Jamovi and JASP. Editors that support R include
Emacs Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
,
Vim Vim means enthusiasm and vigor. It may also refer to: * Vim (cleaning product) * Vim Comedy Company, a movie studio * Vim Records * Vimentin, a protein * "Vim", a song by Machine Head on the album ''Through the Ashes of Empires'' * Vim (text ed ...
(Nvim-R plugin), Kate, LyX, Notepad++, Visual Studio Code, WinEdt, and Tinn-R. Jupyter Notebook can also be configured to edit and run R code. R functionality is accessible from scripting languages including Python,
Perl Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
,
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum (aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapp ...
, F#, and Julia. Interfaces to other, high-level programming languages, like
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
and .NET C# are available.


Implementations

The main R implementation is written in R, C, and Fortran. Several other implementations aimed at improving speed or increasing extensibility. A closely related implementation is pqR (pretty quick R) by Radford M. Neal with improved memory management and support for automatic multithreading. Renjin and FastR are
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
implementations of R for use in a Java Virtual Machine. CXXR, rho, and Riposte are implementations of R in C++. Renjin, Riposte, and pqR attempt to improve performance by using multiple cores and deferred evaluation. Most of these alternative implementations are experimental and incomplete, with relatively few users, compared to the main implementation maintained by the R Development Core Team. TIBCO, who previous sold the commercial implementation S-PLUS, built a runtime engine called TERR, which is part of Spotfire. Microsoft R Open (MRO) is a fully compatible R distribution with modifications for multi-threaded computations. As of 30 June 2021, Microsoft started to phase out MRO in favor of the CRAN distribution.


Communities

R has local communities worldwide for users to network, share ideas, and learn. A growing number of R events bring users together, such as conferences (e.g. useR!, WhyR?, conectaR, SatRdays), meetups, as well as R-Ladies groups that promote gender diversity. The R Foundation taskforce focuses on women and other under-represented groups.


useR! conferences

The official annual gathering of R users is called "useR!". The first such event was useR! 2004 in May 2004,
Vienna en, Viennese , iso_code = AT-9 , registration_plate = W , postal_code_type = Postal code , postal_code = , timezone = CET , utc_offset = +1 , timezone_DST ...
, Austria. After skipping 2005, the useR! conference has been held annually, usually alternating between locations in Europe and North America. History: * useR! 2006, Vienna, Austria * useR! 2007, Ames, Iowa, US * useR! 2008, Dortmund, Germany * useR! 2009, Rennes, France * useR! 2010, Gaithersburg, Maryland, US * useR! 2011, Coventry, United Kingdom * useR! 2012, Nashville, Tennessee, US * useR! 2013, Albacete, Spain * useR! 2014, Los Angeles, California, US * useR! 2015, Aalborg, Denmark * useR! 2016, Stanford, California, US * useR! 2017, Brussels, Belgium * useR! 2018, Brisbane, Australia * useR! 2019, Toulouse, France * useR! 2020, took place online due to COVID-19 pandemic * useR! 2021, took place online due to COVID-19 pandemic * useR! 2022, took place online due to COVID-19 pandemic The dates and the location for the next useR! event is to be decided as of end of 2022.


''The R Journal''

'' The R Journal'' is an
open access Open access (OA) is a set of principles and a range of practices through which research outputs are distributed online, free of access charges or other barriers. With open access strictly defined (according to the 2001 definition), or libre o ...
, refereed journal of the R project. It features short to medium length articles on the use and development of R, including packages, programming tips, CRAN news, and foundation news.


Comparison with alternatives

R is comparable to popular commercial statistical packages such as
SAS SAS or Sas may refer to: Arts, entertainment, and media * ''SAS'' (novel series), a French book series by Gérard de Villiers * ''Shimmer and Shine'', an American animated children's television series * Southern All Stars, a Japanese rock ba ...
, SPSS, and Stata. One difference is that R is available at no charge under a
free software license A free-software license is a notice that grants the recipient of a piece of software extensive rights to modify and software distribution, redistribute that software. These actions are usually prohibited by copyright law, but the rights-holde ...
. In January 2009, the ''
New York Times ''The New York Times'' (''the Times'', ''NYT'', or the Gray Lady) is a daily newspaper based in New York City with a worldwide readership reported in 2020 to comprise a declining 840,000 paid print subscribers, and a growing 6 million paid ...
'' ran an article charting the growth of R, the reasons for its popularity among data scientists and the threat it poses to commercial statistical packages such as SAS. In June 2017 data scientist Robert Muenchen published a more in-depth comparison between R and other software packages, "The Popularity of Data Science Software". R is more procedural than either SAS or SPSS, both of which make heavy use of pre-programmed procedures (called "procs") that are built-in to the language environment and customized by parameters of each call. R generally processes data in-memory, which limits its usefulness in processing larger files.


Commercial support

Although R is an