Data Types in R Programming

Data Types in R:

Variables can store data of different types. In R programming, variables do not need to be declared with any particular type. There are mainly 5 basic data types in R Programming:

    1. Logical
    2. Numeric
    3. Integer
    4. Complex
    5. Character

Logical:

The logical data type has only two values such as TRUE and FALSE. So it is also known as a boolean data type.

Numeric:

It represents all real numbers with or without decimal values.

Integer:

It specifies real values without decimal points. You can use the suffix to specify integer data.

Complex:

This data type is used to specify purely imaginary values in R.

Character:

This data type is used to specify character or string values in a variable.