EZ

Eduzan

Learning Hub

Eduzan
Eduzan / R (programming language)

Data Structures

data structure is a specific way of organizing and storing data in a computer so that it can be used efficiently. The goal is to optimize time and space complexity for various tasks. In R programming, data structures are tools designed to handle and manipulate collections of values.

R’s native data structures are often categorized based on their dimensionality (1D, 2D, or nD) and whether they are homogeneous (all elements must be of the same type) or heterogeneous (elements can have different types). This classification results in six commonly used data structures for data analysis in R.

The most essential data structures used in R include: 

  1. Vectors
  2. Lists
  3. Dataframes
  4. Matrices
  5. Arrays
  6. Factors
  7. Tibbles
End of lesson.