R - (Datatype|Type|Storage Mode) of an object (typeof, mode)

Card Puncher Data Processing

About

In the C code underlying R, all objects are pointers to a structure with typedef SEXPREC; the different R data types are represented in C by SEXPTYPE, which determines how the information in the various parts of the structure is used.

List

NULL NULL
symbol a variable name
pairlist a pairlist object (mainly internal)
closure a function
environment an environment
promise an object used to implement lazy evaluation
language an R language construct
special an internal function that does not evaluate its arguments
builtin an internal function that evaluates its arguments
char a ‘scalar’ string object (internal only) ***
logical a vector containing logical values
integer a vector containing integer values
double a vector containing real values
complex a vector containing complex values
character a vector containing character values
the special variable length argument ***
any a special type that matches all types: there are no objects of this type
expression an expression object
list a list
bytecode byte code (internal only) ***
externalptr an external pointer object
weakref a weak reference object
raw a vector containing bytes
S4 an S4 object which is not a simple object

Function

  • typeof: typeof determines the (R internal) type or storage mode of any object
  • mode: Get or set the type or storage mode of an object.
  • storage.mode: Get or set the type or storage mode of an object.





Discover More
Card Puncher Data Processing
R - (Object|Variable|Symbol)

R provides a number of specialized objects. They are created (instantiated), used and referenced through variable (known as symbol). When you read the term object in the documentation, you can interchange...
Card Puncher Data Processing
R - Class

A class is just an attribute of an object. You can remove the attribute with the function . The class with then become the type A list can have different class. unclass returns (a copy of) its...
Card Puncher Data Processing
R - Data Type

See: The 6 atomics vector types



Share this page:
Follow us:
Task Runner