i

R Programming Complete Tutorial

R Data Types & Structures

Generally, while doing programming on any platform, we need to use various variables to store information. We may like to store information of different types like character, integer, and float, double or even Boolean.Based on the types of variables, the operating system allocates memory and decides what can be stored in the reserved memory.


Data types of R

In the below table, we have set some examples of mostly used data types in R programming.


R Data Structure

R's robust ability to handle and execute complex statistical operations with an automated approach is one of its essential features. R handles complex computations using:

Vector – A fundamental data structure of R containing the same type of data.

Lists – Lists store collections of objects.

Matrices – A matrix is a 2D array of numbers or other types of mathematical objects.

Arrays- It handles Multidimensional data.

Data Frames - It is generated by combining multiple vectors such that each vector becomes a separate column.

Factors- a structural way to handle categorical variables.