Google News
logo
R - Interview Questions
What are the different data structures in R?
Broadly speaking these are Data Structures available in R :

Data Structures in R

Data Structure Description
Vector 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 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.
Advertisement