Typedef predefined data type Requires USE_RINTERNALS

SEXPTYPE is an alias to an unsigned int. It is used to encode the type of an R object that SEXPREC holds, namely in struct sxpinfo_struct, where it works to declare the type of the struct member type. To access the type of a SEXPREC you can use TYPEOF.

Declaration

typedef unsigned int SEXPTYPE;

In Rinternals.h.

SEXPTYPEs and R objects

SEXPTYPE (int)R object
NILSXP (0)The null object in R, see NULL.
SYMSXP (1)Names and symbols, see name.
LISTSXP (2)Lists of dotted pairs, see pairlist.
CLOSXP (3)Functions, see closure.
ENVSXP (4)Environments, see environment.
PROMSXP (5)Promises, see promise.
LANGSXP (6)Language objects are calls (including formulae), see call and formula.
SPECIALSXP (7)Special forms.
BUILTINSXP (8)Builtin non-special forms.
CHARSXP (9)"scalar" string type (internal only).
LGLSXP (10)Logical vectors, see logical.
INTSXP (13)Integer vectors, see integer.
REALSXP (14)Double vectors, see double.
CPLXSXP (15)Complex vectors, see complex.
STRSXP (16)Character vectors, see character.
DOTSXP (17)Dot-dot-dot object, dots.
ANYSXP (18)Make "any" args work.
VECSXP (19)Generic vectors, i.e. lists, see list.
EXPRSXP (20)Expressions vectors, see expression.
BCODESXP (21)Byte code.
EXTPTRSXP (22)External pointer.
WEAKREFSXP (23)Weak reference
RAWSXP (24)Raw bytes, see raw.
S4SXP (25)S4, non-vector, see S4 Introduction.
NEWSXP (30)Fresh node created in new page.
FREESXP (31)Node released by GC.
FUNSXP (99)Pseudo-type lumping closure, builtin and special.

References

https://cran.r-project.org/doc/manuals/r-patched/R-ints.html#SEXPTYPEs

See also