HistoryR is an open-source implementation of the S (programming language), S programming language combined with lexical scoping semantics from Scheme (programming language), 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 (programmer), John Chambers, Doug Dunn, Jean McRae, and Judy Schilling at Bell Laboratories, Bell Labs around 1976. Many codes written for S run unaltered in R. Scheme was created by computer scientists Gerald Jay Sussman, Gerald J. Sussman and Guy L. Steele Jr. at Massachusetts Institute of Technology, 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 a free and open-source software under the GNU General Public License. The first official release came in June 1995. The Comprehensive R Archive Network (CRAN) was officially announced on 23 April 1997 with 3 mirrors and 12 contributed packages. 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, Michael Lawrence, Friedrich Leisch, Uwe Ligges, Thomas Lumley (statistician), Thomas Lumley, Sebastian Meyer, Paul Murrell, Martyn Plummer, Brian Ripley, Deepayan Sarkar, Duncan Temple Lang, Luke Tierney, 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. The first official Software release life cycle#BETA, "stable beta" version (v1.0) was released on 29 February 2000. In April 2003, the R Foundation was founded as a non-profit organization to provide further support for the R project.
StatisticsR and its libraries implement various statistical and graphical techniques, including linear and nonlinear modeling, classical statistical tests, spatial analysis, spatial and time-series analysis, classification, clustering, and others. R is easily extensible through functions and extensions, and its community is noted for contributing packages. Many of R's standard functions are written in R, which makes it easy for users to follow the algorithmic choices made. For computationally intensive tasks, C (programming language), C, C++, and Fortran code can be Linking (computing), linked and called at run time. Advanced users can write C, C++, Java (programming language), Java, .NET Framework, .NET or Python (programming language), Python code to manipulate R objects directly. R is highly extensible through the use of packages for specific functions and specific applications. Due to its S (programming language), S heritage, R has stronger object-oriented programming facilities than most statistical computing languages. Extending it is facilitated by its lexical scoping rules. Another of R's strengths is static graphics; it can produce publication-quality graphs that include mathematical symbols. Dynamic and interactive graphics are available through additional packages.
ProgrammingR is an interpreted language; users typically access it through a command-line interpreter. If a user types
2+2at the R command prompt and presses enter, the computer replies with 4. Like languages such as APL (programming language), APL and MATLAB, R supports Matrix (mathematics), matrix arithmetic. R's data structures include Column vector, vectors, Matrix (mathematics), matrices, arrays, data frames (similar to Table (database), tables in a relational database) and List (computing), lists. Arrays are stored in column-major order. R's extensible object system includes objects for (among others): Regression analysis, regression models, time-series and Spatial analysis, geo-spatial coordinates. R has no scalar data type. Instead, a scalar is represented as a length-one vector. Many features of R derive from Scheme (programming language), Scheme. R uses S-expressions to represent both data and code. Functions are first-class functions, first-class objects and can be manipulated in the same way as data objects, facilitating meta-programming that allows multiple dispatch. Variables in R are lexical scope, lexically scoped and dynamic typing, dynamically typed. Function arguments are passed by value, and are lazy evaluation, lazy—that is to say, they are only evaluated when they are used, not when the function is called. R supports procedural programming with Function (computer science), functions and, for some functions, object-oriented programming with generic functions. A generic function acts differently depending on the Class (computer programming), classes of the arguments passed to it. In other words, the generic function Dynamic dispatch, dispatches the Method (computer science), method implementation specific to that object's Class (computer programming), class. For example, R has a Generic function, generic
print(objectname)Although used mainly by statisticians and other practitioners seeking an environment for statistical computation and software development, R can also operate as a numerical linear algebra, general matrix calculation toolbox – with performance benchmarks comparable to GNU Octave or MATLAB.
PackagesR's capabilities are extended through user-created ''packages'', which offer statistical techniques, graphical devices, import/export, reporting (RMarkdown, knitr, Sweave), etc. R's packages and the ease of installing and using them, has been cited as driving the language's widespread adoption in data science. The packaging system is also used by researchers to create compendia to organise research data, code and report files in a systematic way for sharing and archiving. Multiple packages are included with the basic installation. more than 15,000 additional packages were available at the R package, Comprehensive R Archive Network (CRAN), Bioconductor, Omegahat, GitHub, and other repositories. The "Task Views" on the CRAN website lists packages in fields including Finance, Genetics, High Performance Computing, Machine Learning, Medical Imaging, Social Sciences and Spatial Statistics. R has been identified by the Food and Drug Administration, 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, Complementary DNA, 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
MilestonesA 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.
InterfacesVarious 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 Integrated development environment, IDE. IDEs for R include (in alphabetical order) Rattle GUI, R Commander, RKWard, RStudio, and Tinn-R. R is also supported in multi-purpose IDEs such as Eclipse (software), Eclipse via the StatET plugin, and Microsoft Visual Studio, Visual Studio via the R Tools for Visual Studio. Of these, Rstudio is the most commonly used. Editors that support R include Emacs Speaks Statistics, Emacs, Vim (text editor), Vim (Nvim-R plugin), Kate (text editor), Kate, LyX, Notepad++, Visual Studio Code, WinEdt, and Tinn-R. Jupyter, Jupyter Notebook can also be configured to edit and run R code. R functionality is accessible from scripting languages including Python (programming language), Python, Perl, Ruby (programming language), Ruby, F Sharp (programming language), F#, and Julia (programming language), Julia. Interfaces to other, high-level programming languages, like Java (programming language), Java and C Sharp (programming language), .NET C# are available.
ImplementationsThe 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 an
CommunitiesR 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! conferences, useR!, WhyR?, conectaR, SatRdays), meetups, as well as R-Ladies Global, R-Ladies groups that promote gender diversity. The R Foundation taskforce focuses on women and other under-represented groups.
useR! conferencesThe official annual gathering of R users is called "useR!". The first such event was useR! 2004 in May 2004, Vienna, 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, USA * useR! 2008, Dortmund, Germany * useR! 2009, Rennes, France * useR! 2010, Gaithersburg, Maryland, USA * useR! 2011, Coventry, United Kingdom * useR! 2012, Nashville, Tennessee, USA * useR! 2013, Albacete, Spain * useR! 2014, Los Angeles, California, USA * useR! 2015, Aalborg, Denmark * useR! 2016, Stanford, California, USA * 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 no next event date has been set yet.
''The R Journal''''The R Journal'' is an open access, Academic journal, 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 alternativesR is comparable to popular commercial statistical packages such as SAS (software), SAS, SPSS, and Stata. One difference is that R is available at no charge under a free software license. In January 2009, the ''New York Times'' 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 supportAlthough R is an open-source project, some companies provide commercial support and extensions. In 2007, Richard Schultz, Martin Schultz, Steve Weston and Kirk Mettler founded Revolution Analytics to provide commercial support for Revolution R, their distribution of R, which includes components developed by the company. Major additional components include: ParallelR, the R Productivity Environment IDE, RevoScaleR (for big data analysis), RevoDeployR, web services framework, and the ability for reading and writing data in the SAS file format.Morgan, Timothy Prickett (2011-02-07). "'Red Hat for stats' goes toe-to-toe with SAS". The Register, 7 February 2011. Retrieved from https://www.theregister.co.uk/2011/02/07/revolution_r_sas_challenge/. Revolution Analytics offers an R distribution designed to comply with established Verification and validation, IQ/OQ/PQ criteria that enables clients in the pharmaceutical sector to validate their installation of REvolution R. In 2015, Microsoft Corporation acquired Revolution Analytics and integrated the R programming language into SQL Server, Power BI, Azure SQL Managed Instance, Azure Cortana Intelligence, Microsoft ML Server and Visual Studio 2017. In October 2011, Oracle Corporation, Oracle announced the ''Big Data Appliance'', which integrates R, Apache Hadoop, Oracle Linux, and a NoSQL database with Exadata hardware. , Oracle R EnterpriseChris Kanaracus (2012)
Basic syntaxThe following examples illustrate the basic programming language syntax, syntax of the language and use of the command-line interface. (An expanded list of standard language features can be found in the R manual, "An Introduction to R".) In R, the generally preferred Assignment (computer science), assignment operator is an arrow made from two characters
=can be used in some cases.
Structure of a functionOne of R's strengths is the ease of creating new functions. Objects in the function body remain local to the function, and any data type may be returned. Example:
Modeling and plottingThe R language has built-in support for data modeling and graphics. The following example shows how R can easily generate and plot a linear model with residuals.
Mandelbrot setShort R code calculating Mandelbrot set through the first 20 iterations of equation ''z'' = ''z''2 + ''c'' plotted for different complex constants ''c''. This example demonstrates: * use of community-developed external libraries (called packages), in this case caTools package * handling of complex numbers * multidimensional arrays of numbers used as basic data type, see variables
See also* S (programming language), S programming language * R package * Comparison of numerical-analysis software * Comparison of statistical packages * List of numerical-analysis software * List of statistical software * Rmetrics * RStudio * Tidyverse
External links* of the R project