Data structures in programming languages are used to store data in an organized manner. Data structures in R are similarly used to store data for different purposes. Basic data structures in R are ,
Let’s talk about each data structure briefly.
Vectors are one-dimensional arrays. c() function is used to create a vector.
Scalars are one element vectors which means scalars hold constant values.