R (programming language)

From Wikipedia, the free encyclopedia

Jump to: navigation, search
R
Designed by Ross Ihaka and Robert Gentleman
Developer R Development Core Team
Latest release 2.8.1/ 2008-12-22; 105 days ago
Latest unstable release Through SVN
Influenced by S
OS Cross-platform
License GNU General Public License
Website http://www.r-project.org/

In computing, R is a programming language and software environment for statistical computing and graphics. It is an implementation of the S programming language with lexical scoping semantics inspired by Scheme.

R was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand, and is now developed by the R Development Core Team. It is named partly after the first names of the first two R authors (Robert Gentleman and Ross Ihaka), and partly as a play on the name of S.[1] The R language has become a de facto standard among statisticians for the development of statistical software.[2][3]

R is widely used for statistical software development and data analysis.[4] R is part of the GNU project[5], and its source code is freely available under the GNU General Public License, and pre-compiled binary versions are provided for various operating systems. R uses a command line interface, though several graphical user interfaces are available.

Contents

[edit] Features

R provides a wide variety of statistical (linear and nonlinear modeling, classical statistical tests, time-series analysis, classification, clustering, and others) and graphical techniques. R, like S, is designed around a true computer language, and it allows users to add additional functionality by defining new functions. There are some important differences, but much code written for S runs unaltered. Much of R's system is itself written in the language, which makes it easy for users to follow the algorithmic choices made. For computationally-intensive tasks, C, C++ and Fortran code can be linked and called at run time. Advanced users can write C code to manipulate R objects directly.

R is also highly extensible through the use of user-submitted packages for specific functions or specific areas of study. Due to its S heritage, R has stronger object-oriented programming facilities than most statistical computing languages. Extending R is also eased by its permissive lexical scoping rules.[6]

Another of R's strengths is its graphical facilities, which produce publication-quality graphs which can include mathematical symbols. R has its own LaTeX-like documentation format, which is used to supply comprehensive documentation, both on-line in a number of formats and in hard copy.

Although R is mostly used by statisticians and other practitioners requiring an environment for statistical computation and software development, it can also be used as a general matrix calculation toolbox with comparable benchmark results to GNU Octave and its proprietary counterpart, MATLAB (version < 7).[7]

[edit] Packages

The capabilities of R are extended through user-submitted packages, which allow specialized statistical techniques, graphical devices, as well as programming interfaces and import/export capabilities to many external data formats. These packages are developed in R, LaTeX, Java, and often C and Fortran. A core set of packages are included with the installation of R, with a total of 1628 (as of November 2008) available at the Comprehensive R Archive Network (CRAN). Notable packages by subject area are listed along with comments on the official R Task View pages.

[edit] Development

The bioinformatics community has seeded a successful effort to use R for the analysis of data from molecular biology laboratories. The bioconductor project, which started in the fall of 2001, provides R packages for the analysis of genomic data, such as Affymetrix and cDNA microarray object-oriented data handling and analysis tools.

The Gnumeric developers have cooperated with the R project to improve the accuracy of Gnumeric.[8]

[edit] Milestones

  • Version 0.16 – This is the last alpha version developed primarily by Ihaka and Gentleman. Much of the basic functionality from the "White Book" (see S history) was implemented. The mailing lists commenced on April 1, 1997.
  • Version 0.49 – April 23, 1997 – This is the oldest available source release, and compiles on a limited number of Unix-like platforms [1]. CRAN is started on this date, with 3 mirrors that initially hosted 12 packages [2]. Alpha versions of R for Microsoft Windows and Mac OS are made available shortly after this version.
  • Version 0.60 – December 5, 1997 – R becomes an official part of the GNU Project [3]. The code is hosted and maintained on CVS (since September 17, 1997 — although anonymous access wasn't granted until November 12, 1999).
  • Version 1.0.0 – February 29, 2000 – Considered stable enough for production use [4].
  • Version 1.4.0 - December 19, 2001 – S4 methods are introduced [5], and the first version for Mac OS X is made available soon after [6].
  • Version 2.0.0 – October 4, 2004 – Introduced lazy loading, which enables fast loading of data with minimal expense of system memory [7].
  • Version 2.1.0 – April 18, 2005 – Support for UTF-8 encoding, and the beginnings of internationalization and localization for different languages [8].
  • Version 2.5.0 – April 24, 2007 – Object name completion by integration of package ‘rcompletion’, and ‘Rscript’ front-end, which enables shell-like R scripting [9].
  • Version 2.6.0 – October 3, 2007 – Improved handling of data with a large number of identical strings [10].
  • Version 2.7.0 – April 22, 2008 – Improvements of graphics output, and change of default device from PostScript to PDF [11].
  • Version 2.8.0 - October 20, 2008 - var(), cov(), cor(), sd() etc now by default (when 'use' is not specified) return NA in many cases where they signalled an error before.

[edit] Productivity tools

There are various interfaces to R.

[edit] Graphical user interfaces

[edit] Editors and IDEs

Bluefish[11], ConTEXT, Eclipse[12], Emacs (Emacs Speaks Statistics), Geany, jEdit[13], Kate[14], Syn[15], TextMate, Tinn-R[16], Vim, SciTE, Smultron, and WinEdt (R Package RWinEdt).

[edit] Scripting languages

R functionality has been made accessible from several scripting languages such as Python (by the RPy[17] interface package) and Perl (by the Statistics::R[18] module).

[edit] Commercial tools

There are several commercialized or enterprise versions of R, which include support and services.

[edit] Finding information about R

The brevity of R's name makes it difficult to use search engines to find information about it. Specialist sources include RSeek [23] and the R Search Engine [24].

[edit] CRAN

R and user-submitted packages are commonly distributed through CRAN, which is an acronym for the Comprehensive R Archive Network. There are over 60 CRAN mirrors worldwide, with the head-node (http://cran.r-project.org/) located at the Wirtschaftsuniversität Wien in Vienna, Austria. One way of searching for information about R is to find sites that link to CRAN.

[edit] R News

An open access newsletter called R News is released online two to three times a year featuring statistical computing and development articles that might be of interest to both users and developers of R. Articles are anonymously peer-reviewed. It has been in press since January 2001.[25]

[edit] See also

[edit] References

  1. ^ Kurt Hornik. The R FAQ: Why is R named R?. ISBN 3-900051-08-9. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-is-R-named-R_003f. Retrieved on 2008-01-29. 
  2. ^ Fox, John and Andersen, Robert (January 2005) (PDF). Using the R Statistical Computing Environment to Teach Social Statistics Courses. Department of Sociology, McMaster University. http://www.unt.edu/rss/Teaching-with-R.pdf. Retrieved on 2006-08-03. 
  3. ^ "Data Analysts Captivated by R's Power". http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html. "R is also the name of a popular programming language used by a growing number of data analysts inside corporations and academia. It is becoming their lingua franca..." 
  4. ^ "Data Analysts Captivated by R’s Power". New York Times. 6 January 2009. http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html?emc=eta1. 
  5. ^ http://www.r-project.org/about.html
  6. ^ Jackman, Simon (Spring 2003). "R For the Political Methodologist" (PDF). The Political Methodologist (Political Methodology Section, American Political Science Association) 11 (1): 20–22. http://polmeth.wustl.edu/tpm/tpm_v11_n2.pdf. Retrieved on 2006-08-03. 
  7. ^ "Speed comparison of various number crunching packages (version 2)". SciView. http://www.sciviews.org/benchmark. Retrieved on 2007-11-03. 
  8. ^ Gnumeric, Team (2004-12-19). "Gnumeric 1.4 is Here!". The GNOME Project. http://gnomedesktop.org/node/2090. Retrieved on 2006-04-30. 
  9. ^ "rggobi home page". http://www.ggobi.org/rggobi/. Retrieved on 2008-12-07. 
  10. ^ "Rattle: Gnome R Data Mining". Togaware. http://rattle.togaware.com. Retrieved on 2007-11-03. 
  11. ^ Customizable syntax highlighting based on Perl Compatible regular expressions, with subpattern support and default patterns for..R, tenth bullet point, Bluefish Features, Bluefish website, retrieved 9 July 2008.
  12. ^ WalWare - Homepage
  13. ^ Jose Claudio Faria. "R syntax". http://community.jedit.org/?q=node/view/2339. Retrieved on 2007-11-03. 
  14. ^ "Syntax Highlighting". Kate Development Team. http://kate-editor.org/downloads/syntax_highlighting. Retrieved on 2008-07-09. 
  15. ^ "Syn text editor". Sourceforge. http://syn.sourceforge.net/. Retrieved on 2007-11-03. 
  16. ^ SourceForge.net: Tinn-R
  17. ^ RPy home page
  18. ^ Statistics::R page on CPAN
  19. ^ "XL Solutions Corporation". http://www.experience-rplus.com/. Retrieved on 2008-12-07. 
  20. ^ "REvolution R". REvolution Computing. http://www.revolution-computing.com/products/revolution-r.php. Retrieved on 2008-12-16. 
  21. ^ "Press Release: Intel Capital Makes Series A Investment in REvolution Computing". Intel. 2008-01-22. http://www.intel.com/capital/news/releases/080122.htm. Retrieved on 2008-01-29. 
  22. ^ "RStat - Enterprise-strength statistical computing environment". Random Technologies. http://random-technologies-llc.com/products/RStat/rstat. Retrieved on 2008-01-29. 
  23. ^ R Search Engine by Sasha Goodman
  24. ^ R Search Engine (Dan Goldstein)
  25. ^ CRAN: R News

[edit] Resources

  • Crawley, M.J. (2005). Statistics: An Introduction Using R. John Wiley, New York. 
  • Crawley, M.J. (2007). The R Book. John Wiley, New York. ISBN 978-0-470-51024-7. 
  • Everitt, B. S. and Hothorn, T. (2006). A Handbook of Statistical Analyses Using R. Chapman & Hall/CRC. 
  • Faraway, J. J. (2004). Linear Models with R. Chapman & Hall/CRC. 
  • Faraway, J. J. (2005). Extending the Linear Model with R: Generalized Linear, Mixed Effects and Nonparametric Regression Models. Chapman & Hall/CRC. 
  • Ihaka, R.; Gentleman, R. (1996). "R: A language for data analysis and graphics". Journal of Computational and Graphical Statistics 5 (3): 299–314. doi:10.2307/1390807. 
  • Maindonald, J. and Braun, W. J. (2007). Data Analysis and Graphics Using R, second edition. Cambridge University Press. 
  • Murrell, P. (2005). R Graphics. Chapman & Hall/CRC. 
  • Verzani, J. (2004). Using R for Introductory Statistics. Chapman & Hall/CRC. 
  • Venables & Ripley (2002). Modern Applied Statistics with SPlus. Springer.  (See also ‘R’ Complements to Modern Applied Statistics with SPlus by the same authors.)

An extensive list (with brief comments) of books related to R is here: [12]

[edit] External links

Personal tools