Data types

There are several basic data types in R for handling different types of data and values:

  • numeric: The numeric data type is used to store real or decimal vectors and is identical to the double data type.
  • double: This data type can store and represent double precision vectors.
  • integer: This data type is used for representing 32-bit integer vectors.
  • character: This data type is used to represent character vectors, where each element can be a string of type character
  • logical: The reserved words TRUE and FALSE are logical constants in the R language and T and F are global variables. All these four are logical type vectors.
  • complex: This data type is used to store and represent complex numbers
  • factor: This type is used to represent nominal or categorical ...

Get Learning Social Media Analytics with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.