The first step of learning R programming is getting familiar with basic R objects and their behavior. In this chapter, you will learn the following topics:
Creating and subsetting atomic vectors (for example, numeric vectors, character vectors, and logical vectors), matrices, arrays, lists, and data frames.
Defining and working with functions
"Everything that exists is an object. Everything that happens is a function." -- John Chambers
For example, in statistical analysis, we often feed a set of data to a linear regression model and obtain a group of linear coefficients.
Provided that there are different types of objects in R, when we do this, what basically happens in R is that we provide a data frame object that holds the set of data, carry it to the linear model function and get a list object consisting of the properties of the regression results, and finally extract a numeric vector, which is another type of object, from the list to represent the linear coefficients...