The Art of R Programming

(WallPaper) #1
R has a number of virtues:


  • It is a public-domain implementation of the widely regarded S statistical
    language, and the R/S platform is a de facto standard among profes-
    sional statisticians.

  • It is comparable, and often superior, in power to commercial products
    in most of the significant senses—variety of operations available, pro-
    grammability, graphics, and so on.

  • It is available for the Windows, Mac, and Linux operating systems.

  • In addition to providing statistical operations, R is a general-purpose
    programming language, so you can use it to automate analyses and cre-
    ate new functions that extend the existing language features.

  • It incorporates features found in object-oriented and functional pro-
    gramming languages.

  • The system saves data sets between sessions, so you don’t need to reload
    them each time. It saves your command history too.

  • Because R is open source software, it’s easy to get help from the user
    community. Also, a lot of new functions are contributed by users, many
    of whom are prominent statisticians.


I should warn you at the outset that you typically submit commands to
R by typing in a terminal window, rather than clicking a mouse in a GUI,
and most R users do not use a GUI. This doesn’t mean that R doesn’t do
graphics. On the contrary, it includes tools for producing graphics of great
utility and beauty, but they are used for system output, such as plots, not for
user input.
If you can’t live without a GUI, you can use one of the free GUIs that
have been developed for R, such as the following open source or free tools:


The first three, RStudio, StatET and ESS, should be consideredintegrated
development environments (IDEs), aimed more toward programming. StatET
and ESS provide the R programmer with an IDE in the famous Eclipse and
Emacs settings, respectively.
On the commercial side, another IDE is available from Revolution Ana-
lytics, an R service company (http://www.revolutionanalytics.com/).
Because R is a programming language rather than a collection of dis-
crete commands, you can combine several commands, each using the output
of the previous one. (Linux users will recognize the similarity to chaining

xx Introduction

Free download pdf