
Chapter 2. The R Environment
R is currently one of the most popular programming environments for statistical computing. It was evolved as an open source language from the S programming language developed at Bell Labs. The main creators of R are two academicians, Robert Gentleman and Ross Ihaka, from the University of Auckland in New Zealand.
The main reasons for the popularity of R, apart from free software under GNU General Public License, are the following:
- R is very easy to use. It is an interpreted language and at the same time can be used for procedural programming.
- R supports both functional and object-oriented paradigms. It has very strong graphical and data visualization capabilities.
- Through its LaTex-like documentation support, R can be used for making high-quality documentation.
- Being an open source software, R has a large number of contributed packages that makes almost all statistical modeling possible in this environment.
This chapter is intended to give a basic introduction to R so that any reader who is not familiar with the language can follow the rest of the book by reading through this chapter. It is not possible to give a detailed description of the R language in one chapter and the interested reader should consult books specially written in R programming. I would recommend The Art of R Programming (reference 1 in the References section of this chapter) and R Cookbook (reference 2 in the References section of this chapter) for those users who are mainly interested in using R for analyzing and modeling data. For those who are interested in learning about the advanced features of R, for example, for writing complex programs or R packages, Advanced R (reference 3 in the References section of this chapter) is an excellent book.