ABSTRACT

This chapter provides a general introduction to the R statistical system. It describes the process of installing R and the program RStudio that provides an attractive interface to the R system. The chapter describes different data types such as characters, factors, and lists, and different "containers" for holding these different data types. It discusses the process of executing collections of R commands by means of scripts and functions and methods for importing and exporting datasets from R. The chapter presents a data frame, performing manipulations, merging data frames, and performing operations on a data frame split by values of a variable. It describes how to install and load R packages and how one gets help using resources from the R system and the RStudio interface. The Help menu in RStudio provides general documentation about the R system. A convenient way to run R scripts is through the text window in the upperleft window of the RStudio environment.