# R

## Contents

**What is R? Where to obtain it?**

R is a software package, one of the most versatile and useful in existence. In principal it is thought as a statistical software, however its versatility makes it useful for virtually any problem that requires use of software for its analysis.

### Differences and similarities with other statistical software

There is one important difference between R and any other professional software.
**R IS FREE**. Normally, when one uses free versions one expects to use a stripped down, no good version of a commercial software. The reasoning in the commercial world we live in usually is: if it is valuable – it should cost money. R is an exception. It actually is more powerful that its commercial predecessor (S and Splus) and it is absolutely free. Even more, one can obtain support for it by subscribing to R-help mailing list, https://stat.ethz.ch/mailman/listinfo/r-help, which has over 200 posts every day. Amazingly, this free support was by far my best experience with support of any software I have ever used. If the question is interesting you should
expect an answer very quickly. Careful what you post though, the people who maintain and answer questions are well known statistics professors and take very harshly at silly questions which could be easily answered by reading the introductory guides.

#### R vs Matlab

In spirit R is similar with Matlab through the uses of objects such as vectors and matrices rather than one dimensional variables. It is superior to Matlab when dealing with specific statistical analysis such as we see in the current course. However, linear algebra (matrix decomposition and numerical analysis of PDE is debatably faster with Matlab).

#### R vs Splus

Commercial software similar with R. Very expensive. Predecessor to R. Going into point and click direction to try and differentiate itself from R. Not advised.

#### R vs SAS

SAS is a commercial version used for statistical analysis. It is a strong software that essentially is different in approach and analysis from R. It is complementing R. Better and much faster at dealing with large datasets (millions of observations). Harder to program nested algorithms than R.

#### Spreadsheet software EXCEL, SPSS, Minitab etc.

These are all point and click programs. Not recommended for serious analysis. They can work with small data sets but crash quickly. They were designed to understand statistical concepts in undergraduate courses as well as manipulate data in a simple way.

#### Symbolic software: Mathematica, Maple etc.

These programs serve a different purpose than R. Mathematicians use these programs to essentially deal with non-random problems. Since statistics is by definition studying randomness they are not appropriate.

#### R with C, C++, JAVA

These are low level languages. Any program you write in any of the software mentioned thus far you should be able to program using low level language. The development of the program will take much longer, thus they are not suitable for use in a class such as the one presented. They, however have no equal when the speed of execution is an issue.
**Conclusion**: R pretty much has no equal. A good statistician should know how to use R, SAS and a low level language preferably C.

### Obtaining R. Useful tools

For a detailed description please see the file “R Installation and Administration” on the course web site or on the R web site directly(see Figure above). You can find a wealth of information about R on the [Manuals] page and on the [Wiki page for R].

#### R editor

There are lots of editors(free or not) designed for R, such as Tinn-R, RStudio, SourceEdit and so on. One can choose the editor that he/her prefers.

#### Online Tutorial

You can easily find more details about R code, R packages, and R examples on r-project.org.