# R

### Table of Contents

## About

R is a language and environment for statistical computing and graphics.

Syntax is very similar to the S language. S is a language that was developed by John Chambers et al. at Bell Laboratories

The book Statistical Models in S by Chambers and Hastie (the white book) documents the statistical analysis functionality.

In 2004 Insightful purchased the S language from Lucent for $2 million and is the current owner. Insightful sells its implementation of the S language under the product name S-PLUS and has built a number of fancy features (GUIs, mostly) on top of it - hence the \PLUS“.

R was created in New Zealand by Ross Ihaka and Robert Gentleman in 1991 at the University of Auckland.

R provides a wide variety of statistical techniques:

- linear and non-linear modelling,
- classical statistical tests,
- time-series analysis,
- and graphical techniques,

R is an environment within which statistical techniques are implemented. R can be extended via packages. There are about eight packages supplied with the R distribution and many more are available through the CRAN family of Internet sites covering a very wide range of modern statistics.

The R system is divided into 2 conceptual parts:

- The “base” R system (package)that you download from CRAN
- The rest

There is no scale notion on R.

The R functionality has been embedded in Oracle. See ORE (Oracle R Enterprise)

## Syntax

- The semi-colon (;) separates two instructions.

## Limitations

- R is a single-user tool

### (CPU|Multithread)

- R is not multithreaded
- R cannot leverage CPU capacity. R can’t automatically leverage the CPU capacity on a user’s multiprocessor laptop without special packages and programming.

### Memory

- R requires data that it operates on to be first loaded into memory. R is limited by the memory.
- R’s approach to passing data between function invocations results in data duplication. This “call by value” approach to parameter passing can use up memory quickly.

Some users have provided packages to overcome some of the memory limitations, but the users must explicitly program with these packages

## Documentation / Reference

- R has its own LaTeX-like documentation format

Today we are moving from R to Python for most purposes. Better for larger projects. Faster to debug.