Member-only story
A Short Introduction to R Programming
In R, data structures are referred to as objects. Each object can hold vectors as mentioned above, scalars, matrices, arrays, data frames and lists. Amongst all the objects, the list is the most special. This is because a list can hold any or all data types.
Matrices
Matrices are a single two-dimensional data set. And one can create a matrix using the matrix() function. A matrix contains a vector element and nrow & ncol represents the row and column dimensions of the matrix.
Arrays
Arrays are an extension of Matrices. Compared to Matrices, an Array can have more than two dimensions. You can create an array using the array() function.
Data Frames
Data frames are the most common object in R and can be used to store a multitude of different data types. You can create a data frame using the data.frame() function.