Data Structure |
Description |
Vector |
A vector is a sequence of data elements of the same basic type. Members in a vector are called components. |
List |
Lists are the R objects which contain elements of different types like − numbers, strings, vectors or another list inside it. |
Matrix |
A matrix is a two-dimensional data structure. Matrices are used to bind vectors from the same length. All the elements of a matrix must be of the same type (numeric, logical, character, complex). |
Dataframe |
A data frame is more generic than a matrix, i.e different columns can have different data types (numeric, character, logical, etc). It combines features of matrices and lists like a rectangular list. |