The R object

C representation of the R object

SEXP

Pointer to SEXPREC

SEXPREC

R's fundamental data type at C level

SEXPTYPE

Data type for coding of R data subtypes

SEXPREC_HEADER

SEXPREC_HEADER

sxpinfo_struct

struct sxpinfo_struct

Types of R objects

Macros defining the internal types (SEXPTYPE) of R objects

NILSXP

The type of R's NULL

SYMSXP

The type of name and symbol objects

LISTSXP

The type of pairlist objects

CLOSXP

The type of function objects

ENVSXP

The type of environment objects

PROMSXP

The type of promise objects

LANGSXP

The type of language constructs

SPECIALSXP

The type of special forms

BUILTINSXP

The type of builtin non-special forms

CHARSXP

The type of scalar strings (internal only)

LGLSXP

The type of logical vectors

INTSXP

The type of integer vectors

REALSXP

The type of double vectors

CPLXSXP

The type of complex vectors

STRSXP

The type of character vectors

DOTSXP

The type of ... object

ANYSXP

The type of the "any" object

VECSXP

The type of generic vectors (lists)

EXPRSXP

The type of expression objects

BCODESXP

The type of byte code objects

EXTPTRSXP

The type of external pointers

WEAKREFSXP

The type of weak references

RAWSXP

The type of raw vectors

S4SXP

The type of S4, non-vector objects

NEWSXP

The type of fresh node created in new page

FREESXP

The type of R's node released by GC

FUNSXP

The pseudo-type lumping closure, builtin and special

Basic types

C basic types

Rboolean

R's boolean type

Rcomplex

Rcomplex

Rbyte

Rbyte

Macros

TYPEOF

The type of an R object

NA_LOGICAL

NA_LOGICAL

Variables

R_NilValue

R_NilValue

R_LogicalNAValue

R_LogicalNAValue

R_FalseValue

R_FalseValue

R_TrueValue

R_TrueValue

Scalar conversions from C to R

Rf_ScalarLogical

Rf_ScalarLogical

Rf_ScalarInteger

Rf_ScalarInteger

Rf_ScalarReal

Rf_ScalarReal

Rf_ScalarComplex

Rf_ScalarComplex

Rf_ScalarRaw

Rf_ScalarRaw

Rf_mkCharLenCE

Rf_mkCharLenCE

Scalar conversions from R to C

Rf_asLogical

Convert an R scalar logical vector to a C int

Rf_asInteger

Convert an R scalar integer vector to a C int

Rf_asReal

Convert an R scalar double vector to a C double

CHARACTER_VALUE

Convert a scalar R object to a C string

Coercion

Rf_asChar

Coerce an R object to a scalar string (CHARSXP)

Character and Strings

Rf_asChar

Coerce an R object to a scalar string (CHARSXP)

R_CHAR

Convert a string scalar (CHARSXP) to a C-string (char *)

CHARACTER_VALUE

Convert a scalar R object to a C string

Files

Rinternals.h

Rinternals.h