Appendix

An introduction to R

This chapter reviews the basics of the R statistical environment. The topics discussed here include the R programming language, the R graphics and some elementary statistical analysis.

A.1 Introduction

R is, at first glance, user unfriendly in the sense that it is a real programming language rather than point-and-click software. A typical statistical analysis in R is an interactive session where the user types commands on the R console. Indeed, the standard installation of R has a very limited graphical user interface (GUI) which can be enhanced using the package Rcmdr. There are also integrated environments like the free software RStudio (http://www.rstudio.org) which is a spreadsheet-like tool with R as a back end, or the commercial product Revolution R (http://www.revolutionanalytics.com). The following pages are intended as a quick start guide to the R language so that the reader of this book can immediately start to replicate the analyses of the previous chapters. Here we will also mention additional tools that may be valuable in more advanced analyses and production environments. The reader is also invited to read the quick guide called An Introduction to R that comes with every installed version of R (and can be found in the ‘manual’ folder) or the introductory book on the R environment by Dalgaard (2008).

A.2 How to obtain R

R is open source and free software available in ready-to-install binary form for many platforms. ...