R Data, Part 1: Vectors

Samuel E. Buttrey · 2017

The basic unit of computation in R is the vector. This chapter talks about the different sorts of vectors in R. It gives some tools that are useful when handling vectors. Understanding how vectors work is crucial to using R properly and efficiently. R supports several data types. The chapter mentions these data types briefly, and then discusses the important topic of converting data from one type to another. Then, it describes the very important topic of subsetting or extracting. That topic goes together with assigning, or replacing, certain elements of a vector. The chapter also describes the way missing values are handled in R; this topic arises in almost every data cleaning problem. In R, missing values are identified by NA. Missing values are inevitable in real data, so it is important to know the effect they have on computations, and to have tools to identify them and replace them where necessary.

Read the paper · More papers on PaperTik