ABSTRACT

Objects are like the R language’s nouns. They are things, like a vector of numbers, a data set, a word, and a table of results from some analysis. Saying that R is object-oriented means that R is focused on doing actions to objects. Objects can have a number of different types. Vectors are the “fundamental data type” in R. They are simply an ordered group of numbers, character strings, and so on. It may be useful to think of basically all R objects as composed of vectors. Using the component selector can create long repetitive code if a person wants to select many components. A person has to write the object name, a dollar sign, and the component name every time he/she wants to select a component. A person can streamline their code by using commands such as attach and with.