ABSTRACT

This chapter begins by detailing the data types supported by R. Single-mode data structures including vectors and vectorization, matrices, and arrays are described. Attention then turns to multi-mode data structures with special emphasis placed on the role of data frames. Several data manipulation techniques are presented. The final section of this chapter offers a quick guide to programming in R. Many R scripts contain at least a line or two of R program code. A short review of this section provides a basic understanding of the most frequently used R programming structures. Examples include iteration using for, nested for, and while statements. This chapter concludes with a discussion of recursive programming including an example using R.