ABSTRACT

R is a language and an environment for statistical computing and graphics. In this book, R is used to store, manage, and manipulate data; to create graphical displays of data using di↵erent graphical systems; to analyze data using standard statistical procedures; and to perform simulations. In short, everything a student or scientist may want or need to do with data can be done with R, and this book uses R for everything that it covers. For the reader who wants his documents to update (graphs, tables, statistics, etc.) as the data changes, R integrates seamlessly with the typesetting program LATEX via the Sweave and knitr packages. The knitr package also integrates R with markdown, an easy-to-use text markup language. The process of creating documents and solving problems that include all code and update as data changes is called reproducible analysis. Two excellent sources to learn more about the knitr package and reproducible analysis are Dynamic Documents with R and knitr (Xie, 2014) and Reproducible Research with R and RStudio (Gandrud, 2014), respectively.