RAPI
Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
Rinternals.h File Reference
#include <stdio.h>
#include <limits.h>
#include <stddef.h>
#include <R_ext/Arith.h>
#include <R_ext/Boolean.h>
#include <R_ext/Complex.h>
#include <R_ext/Error.h>
#include <R_ext/Memory.h>
#include <R_ext/Utils.h>
#include <R_ext/Print.h>
#include <R_ext/libextern.h>
#include <Rconfig.h>
Include dependency graph for Rinternals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  R_long_vec_hdr_t
struct  R_outpstream_st
struct  R_inpstream_st

Defines

#define R_LEN_T_MAX   INT_MAX
#define LONG_VECTOR_SUPPORT
#define R_XLEN_T_MAX   4503599627370496
#define R_SHORT_LEN_MAX   2147483647
#define R_LONG_VEC_TOKEN   -1
#define INLINE_PROTECT
#define NILSXP   0 /* nil = NULL */
#define SYMSXP   1 /* symbols */
#define LISTSXP   2 /* lists of dotted pairs */
#define CLOSXP   3 /* closures */
#define ENVSXP   4 /* environments */
#define PROMSXP   5 /* promises: [un]evaluated closure arguments */
#define LANGSXP   6 /* language constructs (special lists) */
#define SPECIALSXP   7 /* special forms */
#define BUILTINSXP   8 /* builtin non-special forms */
#define CHARSXP   9 /* "scalar" string type (internal only)*/
#define LGLSXP   10 /* logical vectors */
#define INTSXP   13 /* integer vectors */
#define REALSXP   14 /* real variables */
#define CPLXSXP   15 /* complex variables */
#define STRSXP   16 /* string vectors */
#define DOTSXP   17 /* dot-dot-dot object */
#define ANYSXP
#define VECSXP   19 /* generic vectors */
#define EXPRSXP   20 /* expressions vectors */
#define BCODESXP   21 /* byte code */
#define EXTPTRSXP   22 /* external pointer */
#define WEAKREFSXP   23 /* weak reference */
#define RAWSXP   24 /* raw bytes */
#define S4SXP   25 /* S4, non-vector */
#define NEWSXP   30 /* fresh node created in new page */
#define FREESXP   31 /* node released by GC */
#define FUNSXP   99 /* Closure or Builtin or Special */
#define TYPE_BITS   5
#define MAX_NUM_SEXPTYPE   (1<<TYPE_BITS)
#define CHAR(x)   R_CHAR(x)
#define IS_SCALAR(x, type)   (TYPEOF(x) == (type) && XLENGTH(x) == 1)
#define IS_SIMPLE_SCALAR(x, type)   (IS_SCALAR(x, type) && ATTRIB(x) == R_NilValue)
#define NAMEDMAX   2
#define INCREMENT_NAMED(x)
#define SET_REFCNT(x, v)   do {} while(0)
#define SET_TRACKREFS(x, v)   do {} while(0)
#define DECREMENT_REFCNT(x)   do {} while(0)
#define INCREMENT_REFCNT(x)   do {} while(0)
#define ENABLE_REFCNT(x)   SET_TRACKREFS(x, TRUE)
#define DISABLE_REFCNT(x)   SET_TRACKREFS(x, FALSE)
#define MAYBE_SHARED(x)   (NAMED(x) > 1)
#define NO_REFERENCES(x)   (NAMED(x) == 0)
#define MARK_NOT_MUTABLE(x)   SET_NAMED(x, NAMEDMAX)
#define MAYBE_REFERENCED(x)   (! NO_REFERENCES(x))
#define NOT_SHARED(x)   (! MAYBE_SHARED(x))
#define IS_GETTER_CALL(call)   (CADR(call) == R_TmpvalSymbol)
#define CONS(a, b)   cons((a), (b)) /* data lists */
#define LCONS(a, b)   lcons((a), (b)) /* language lists */
#define EXTPTR_PTR(x)   CAR(x)
#define EXTPTR_PROT(x)   CDR(x)
#define EXTPTR_TAG(x)   TAG(x)
#define BCODE_CODE(x)   CAR(x)
#define BCODE_CONSTS(x)   CDR(x)
#define BCODE_EXPR(x)   TAG(x)
#define isByteCode(x)   (TYPEOF(x)==BCODESXP)
#define PROTECT(s)   Rf_protect(s)
#define UNPROTECT(n)   Rf_unprotect(n)
#define UNPROTECT_PTR(s)   Rf_unprotect_ptr(s)
#define PROTECT_WITH_INDEX(x, i)   R_ProtectWithIndex(x,i)
#define REPROTECT(x, i)   R_Reprotect(x,i)
#define NA_STRING   R_NaString
#define R_ALLOCATOR_TYPE
#define error_return(msg)   { Rf_error(msg); return R_NilValue; }
#define errorcall_return(cl, msg)   { Rf_errorcall(cl, msg); return R_NilValue; }
#define PREXPR(e)   R_PromiseExpr(e)
#define BODY_EXPR(e)   R_ClosureExpr(e)
#define R_XDR_DOUBLE_SIZE   8
#define R_XDR_INTEGER_SIZE   4
#define acopy_string   Rf_acopy_string
#define addMissingVarsToNewEnv   Rf_addMissingVarsToNewEnv
#define alloc3DArray   Rf_alloc3DArray
#define allocArray   Rf_allocArray
#define allocFormalsList2   Rf_allocFormalsList2
#define allocFormalsList3   Rf_allocFormalsList3
#define allocFormalsList4   Rf_allocFormalsList4
#define allocFormalsList5   Rf_allocFormalsList5
#define allocFormalsList6   Rf_allocFormalsList6
#define allocList   Rf_allocList
#define allocMatrix   Rf_allocMatrix
#define allocS4Object   Rf_allocS4Object
#define allocSExp   Rf_allocSExp
#define allocVector   Rf_allocVector
#define allocVector3   Rf_allocVector3
#define any_duplicated   Rf_any_duplicated
#define any_duplicated3   Rf_any_duplicated3
#define applyClosure   Rf_applyClosure
#define arraySubscript   Rf_arraySubscript
#define asChar   Rf_asChar
#define asCharacterFactor   Rf_asCharacterFactor
#define asComplex   Rf_asComplex
#define asInteger   Rf_asInteger
#define asLogical   Rf_asLogical
#define asReal   Rf_asReal
#define asS4   Rf_asS4
#define classgets   Rf_classgets
#define coerceVector   Rf_coerceVector
#define conformable   Rf_conformable
#define cons   Rf_cons
#define copyListMatrix   Rf_copyListMatrix
#define copyMatrix   Rf_copyMatrix
#define copyMostAttrib   Rf_copyMostAttrib
#define copyVector   Rf_copyVector
#define countContexts   Rf_countContexts
#define CreateTag   Rf_CreateTag
#define defineVar   Rf_defineVar
#define dimgets   Rf_dimgets
#define dimnamesgets   Rf_dimnamesgets
#define DropDims   Rf_DropDims
#define duplicate   Rf_duplicate
#define duplicated   Rf_duplicated
#define elt   Rf_elt
#define errorcall   Rf_errorcall
#define eval   Rf_eval
#define findFun   Rf_findFun
#define findFunctionForBody   Rf_findFunctionForBody
#define findVar   Rf_findVar
#define findVarInFrame   Rf_findVarInFrame
#define findVarInFrame3   Rf_findVarInFrame3
#define GetArrayDimnames   Rf_GetArrayDimnames
#define getAttrib   Rf_getAttrib
#define getCharCE   Rf_getCharCE
#define GetColNames   Rf_GetColNames
#define GetMatrixDimnames   Rf_GetMatrixDimnames
#define GetOption1   Rf_GetOption1
#define GetOptionDigits   Rf_GetOptionDigits
#define GetOptionWidth   Rf_GetOptionWidth
#define GetOption   Rf_GetOption
#define GetRowNames   Rf_GetRowNames
#define gsetVar   Rf_gsetVar
#define inherits   Rf_inherits
#define install   Rf_install
#define installChar   Rf_installChar
#define installDDVAL   Rf_installDDVAL
#define installS3Signature   Rf_installS3Signature
#define isArray   Rf_isArray
#define isBasicClass   Rf_isBasicClass
#define isComplex   Rf_isComplex
#define isEnvironment   Rf_isEnvironment
#define isExpression   Rf_isExpression
#define isFactor   Rf_isFactor
#define isFrame   Rf_isFrame
#define isFree   Rf_isFree
#define isFunction   Rf_isFunction
#define isInteger   Rf_isInteger
#define isLanguage   Rf_isLanguage
#define isList   Rf_isList
#define isLogical   Rf_isLogical
#define isSymbol   Rf_isSymbol
#define isMatrix   Rf_isMatrix
#define isNewList   Rf_isNewList
#define isNull   Rf_isNull
#define isNumeric   Rf_isNumeric
#define isNumber   Rf_isNumber
#define isObject   Rf_isObject
#define isOrdered   Rf_isOrdered
#define isPairList   Rf_isPairList
#define isPrimitive   Rf_isPrimitive
#define isReal   Rf_isReal
#define isS4   Rf_isS4
#define isString   Rf_isString
#define isTs   Rf_isTs
#define isUnmodifiedSpecSym   Rf_isUnmodifiedSpecSym
#define isUnordered   Rf_isUnordered
#define isUnsorted   Rf_isUnsorted
#define isUserBinop   Rf_isUserBinop
#define isValidString   Rf_isValidString
#define isValidStringF   Rf_isValidStringF
#define isVector   Rf_isVector
#define isVectorAtomic   Rf_isVectorAtomic
#define isVectorizable   Rf_isVectorizable
#define isVectorList   Rf_isVectorList
#define lang1   Rf_lang1
#define lang2   Rf_lang2
#define lang3   Rf_lang3
#define lang4   Rf_lang4
#define lang5   Rf_lang5
#define lang6   Rf_lang6
#define lastElt   Rf_lastElt
#define lazy_duplicate   Rf_lazy_duplicate
#define lcons   Rf_lcons
#define length(x)   Rf_length(x)
#define lengthgets   Rf_lengthgets
#define list1   Rf_list1
#define list2   Rf_list2
#define list3   Rf_list3
#define list4   Rf_list4
#define list5   Rf_list5
#define list6   Rf_list6
#define listAppend   Rf_listAppend
#define match   Rf_match
#define matchE   Rf_matchE
#define mkChar   Rf_mkChar
#define mkCharCE   Rf_mkCharCE
#define mkCharLen   Rf_mkCharLen
#define mkCharLenCE   Rf_mkCharLenCE
#define mkNamed   Rf_mkNamed
#define mkString   Rf_mkString
#define namesgets   Rf_namesgets
#define ncols   Rf_ncols
#define nlevels   Rf_nlevels
#define NonNullStringMatch   Rf_NonNullStringMatch
#define nrows   Rf_nrows
#define nthcdr   Rf_nthcdr
#define PairToVectorList   Rf_PairToVectorList
#define pmatch   Rf_pmatch
#define psmatch   Rf_psmatch
#define PrintValue   Rf_PrintValue
#define protect   Rf_protect
#define readS3VarsFromFrame   Rf_readS3VarsFromFrame
#define reEnc   Rf_reEnc
#define rownamesgets   Rf_rownamesgets
#define S3Class   Rf_S3Class
#define ScalarComplex   Rf_ScalarComplex
#define ScalarInteger   Rf_ScalarInteger
#define ScalarLogical   Rf_ScalarLogical
#define ScalarReal   Rf_ScalarReal
#define ScalarString   Rf_ScalarString
#define ScalarRaw   Rf_ScalarRaw
#define setAttrib   Rf_setAttrib
#define setSVector   Rf_setSVector
#define setVar   Rf_setVar
#define shallow_duplicate   Rf_shallow_duplicate
#define str2type   Rf_str2type
#define stringSuffix   Rf_stringSuffix
#define stringPositionTr   Rf_stringPositionTr
#define StringBlank   Rf_StringBlank
#define substitute   Rf_substitute
#define topenv   Rf_topenv
#define translateChar   Rf_translateChar
#define translateChar0   Rf_translateChar0
#define translateCharUTF8   Rf_translateCharUTF8
#define type2char   Rf_type2char
#define type2rstr   Rf_type2rstr
#define type2str   Rf_type2str
#define type2str_nowarn   Rf_type2str_nowarn
#define unprotect   Rf_unprotect
#define unprotect_ptr   Rf_unprotect_ptr
#define VectorToPairList   Rf_VectorToPairList
#define warningcall   Rf_warningcall
#define warningcall_immediate   Rf_warningcall_immediate
#define xlength(x)   Rf_xlength(x)
#define xlengthgets   Rf_xlengthgets

Typedefs

typedef unsigned char Rbyte
typedef int R_len_t
typedef ptrdiff_t R_xlen_t
typedef unsigned int SEXPTYPE
typedef struct SEXPREC * SEXP
typedef int PROTECT_INDEX
typedef struct R_allocator R_allocator_t
typedef void(* R_CFinalizer_t )(SEXP)
typedef void * R_pstream_data_t
typedef struct R_outpstream_stR_outpstream_t
typedef struct R_inpstream_stR_inpstream_t

Enumerations

enum  nchar_type { Bytes, Chars, Width }
enum  cetype_t {
  CE_NATIVE = 0, CE_UTF8 = 1, CE_LATIN1 = 2, CE_BYTES = 3,
  CE_SYMBOL = 5, CE_ANY = 99
}
enum  R_pstream_format_t {
  R_pstream_any_format, R_pstream_ascii_format, R_pstream_binary_format, R_pstream_xdr_format,
  R_pstream_asciihex_format
}

Functions

const char *() R_CHAR (SEXP x)
 Access the content of CHARSXP as a C-style string.
Rboolean() Rf_isNull (SEXP s)
 Is this the null value?
Rboolean() Rf_isSymbol (SEXP s)
 Test if an R value is a symbol.
Rboolean() Rf_isLogical (SEXP s)
Rboolean() Rf_isReal (SEXP s)
Rboolean() Rf_isComplex (SEXP s)
Rboolean() Rf_isExpression (SEXP s)
Rboolean() Rf_isEnvironment (SEXP s)
 Is this an environment?
Rboolean() Rf_isString (SEXP s)
Rboolean() Rf_isObject (SEXP s)
 Does an object have a class attribute?
SEXP() ATTRIB (SEXP x)
 Get the attributes of an R value.
int() OBJECT (SEXP x)
 Does an value have a class attribute?
int() MARK (SEXP x)
int() TYPEOF (SEXP x)
 Get object's SEXPTYPE.
int() NAMED (SEXP x)
 Get object copying status.
int() REFCNT (SEXP x)
void() SET_OBJECT (SEXP x, int v)
void() SET_TYPEOF (SEXP x, int v)
void() SET_NAMED (SEXP x, int v)
 Set object copying status.
void SET_ATTRIB (SEXP x, SEXP v)
 Replace an object's attributes.
void DUPLICATE_ATTRIB (SEXP to, SEXP from)
 Replace the attributes of to by those of from.
void SHALLOW_DUPLICATE_ATTRIB (SEXP to, SEXP from)
int() IS_S4_OBJECT (SEXP x)
 Is this an S4 object?
void() SET_S4_OBJECT (SEXP x)
void() UNSET_S4_OBJECT (SEXP x)
int() LENGTH (SEXP x)
int() TRUELENGTH (SEXP x)
void() SETLENGTH (SEXP x, int v)
void() SET_TRUELENGTH (SEXP x, int v)
R_xlen_t() XLENGTH (SEXP x)
R_xlen_t() XTRUELENGTH (SEXP x)
int() IS_LONG_VEC (SEXP x)
int() LEVELS (SEXP x)
int() SETLEVELS (SEXP x, int v)
int *() LOGICAL (SEXP x)
int *() INTEGER (SEXP x)
Rbyte *() RAW (SEXP x)
double *() REAL (SEXP x)
Rcomplex *() COMPLEX (SEXP x)
SEXP() STRING_ELT (SEXP x, R_xlen_t i)
 Examine element of a character vector.
SEXP() VECTOR_ELT (SEXP x, R_xlen_t i)
 Examine element of a list.
void SET_STRING_ELT (SEXP x, R_xlen_t i, SEXP v)
 Set element of character vector.
SEXP SET_VECTOR_ELT (SEXP x, R_xlen_t i, SEXP v)
 Set element of list.
SEXP *() STRING_PTR (SEXP x)
SEXP *NORET() VECTOR_PTR (SEXP x)
R_len_t NORET R_BadLongVector (SEXP, const char *, int)
SEXP() TAG (SEXP e)
 Get tag of pairlist element.
SEXP() CAR (SEXP e)
 Get car of pairlist element.
SEXP() CDR (SEXP e)
 Get tail of pairlist element.
SEXP() CAAR (SEXP e)
 Equivalent to CAR(CAR(e)).
SEXP() CDAR (SEXP e)
 Equivalent to CDR(CAR(e)).
SEXP() CADR (SEXP e)
 Equivalent to CAR(CDR(e)).
SEXP() CDDR (SEXP e)
 Equivalent to CDR(CDR(e)).
SEXP() CDDDR (SEXP e)
 Equivalent to CDR(CDR(CDR(e))).
SEXP() CADDR (SEXP e)
 Equivalent to CAR(CDR(CDR(e))).
SEXP() CADDDR (SEXP e)
 Equivalent to CAR(CDR(CDR(CDR(e)))).
SEXP() CAD4R (SEXP e)
 Equivalent to CAR(CDR(CDR(CDR(CDR(e))))).
int() MISSING (SEXP x)
void() SET_MISSING (SEXP x, int v)
void SET_TAG (SEXP x, SEXP y)
 Set the tag of a pairlist element.
SEXP SETCAR (SEXP x, SEXP y)
 Set the 'car' value of a pairlist element.
SEXP SETCDR (SEXP x, SEXP y)
 Replace the tail of a pairlist element.
SEXP SETCADR (SEXP x, SEXP y)
 Set the 'car' value of the second element of list.
SEXP SETCADDR (SEXP x, SEXP y)
 Set the 'car' value of the third element of list.
SEXP SETCADDDR (SEXP x, SEXP y)
 Set the 'car' value of the fourth element of list.
SEXP SETCAD4R (SEXP e, SEXP y)
 Set the 'car' value of the fifth element of list.
SEXP CONS_NR (SEXP a, SEXP b)
SEXP() FORMALS (SEXP x)
 Access formal arguments of a closure.
SEXP() BODY (SEXP x)
 Access the body of a closure.
SEXP() CLOENV (SEXP x)
 Access the environment of a closure.
int() RDEBUG (SEXP x)
 Query debugging status.
int() RSTEP (SEXP x)
int() RTRACE (SEXP x)
 Get function tracing status.
void() SET_RDEBUG (SEXP x, int v)
void() SET_RSTEP (SEXP x, int v)
void() SET_RTRACE (SEXP x, int v)
 Set function tracing status.
void SET_FORMALS (SEXP x, SEXP v)
void SET_BODY (SEXP x, SEXP v)
void SET_CLOENV (SEXP x, SEXP v)
 Replace the environment of a closure.
SEXP() PRINTNAME (SEXP x)
 Symbol name.
SEXP() SYMVALUE (SEXP x)
 Symbol's value in the base environment.
SEXP() INTERNAL (SEXP x)
 Get function accessed via .Internal().
int() DDVAL (SEXP x)
 Does symbol relate to a ... expression?
void() SET_DDVAL (SEXP x, int v)
void SET_PRINTNAME (SEXP x, SEXP v)
void SET_SYMVALUE (SEXP x, SEXP v)
 Set symbol's value in the base environment.
void SET_INTERNAL (SEXP x, SEXP v)
 Associate a Symbol with a .Internal() function.
SEXP() FRAME (SEXP x)
 Access an environment's Frame, represented as a pairlist.
SEXP() ENCLOS (SEXP x)
 Access enclosing environment.
SEXP() HASHTAB (SEXP x)
int() ENVFLAGS (SEXP x)
void() SET_ENVFLAGS (SEXP x, int v)
void SET_FRAME (SEXP x, SEXP v)
void SET_ENCLOS (SEXP x, SEXP v)
void SET_HASHTAB (SEXP x, SEXP v)
SEXP() PRCODE (SEXP x)
 Access the expression of a promise.
SEXP() PRENV (SEXP x)
 Access the environment of a promise.
SEXP() PRVALUE (SEXP x)
 Access the value of a promise.
int() PRSEEN (SEXP x)
void() SET_PRSEEN (SEXP x, int v)
void SET_PRENV (SEXP x, SEXP v)
void SET_PRVALUE (SEXP x, SEXP v)
 Set the value of a promise.
void SET_PRCODE (SEXP x, SEXP v)
int() HASHASH (SEXP x)
int() HASHVALUE (SEXP x)
void() SET_HASHASH (SEXP x, int v)
void() SET_HASHVALUE (SEXP x, int v)
SEXP R_GetCurrentSrcref (int skip)
SEXP R_GetSrcFilename (SEXP srcref)
SEXP Rf_asChar (SEXP x)
SEXP Rf_coerceVector (SEXP v, SEXPTYPE type)
SEXP Rf_PairToVectorList (SEXP x)
SEXP Rf_VectorToPairList (SEXP x)
SEXP Rf_asCharacterFactor (SEXP x)
int Rf_asLogical (SEXP x)
int Rf_asInteger (SEXP x)
double Rf_asReal (SEXP x)
Rcomplex Rf_asComplex (SEXP x)
char * Rf_acopy_string (const char *in)
void Rf_addMissingVarsToNewEnv (SEXP, SEXP)
SEXP Rf_alloc3DArray (SEXPTYPE mode, int nrow, int ncol, int nface)
SEXP Rf_allocArray (SEXPTYPE mode, SEXP dims)
SEXP Rf_allocFormalsList2 (SEXP sym1, SEXP sym2)
SEXP Rf_allocFormalsList3 (SEXP sym1, SEXP sym2, SEXP sym3)
SEXP Rf_allocFormalsList4 (SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4)
SEXP Rf_allocFormalsList5 (SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5)
SEXP Rf_allocFormalsList6 (SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5, SEXP sym6)
SEXP Rf_allocMatrix (SEXPTYPE mode, int nrow, int ncol)
SEXP Rf_allocList (int n)
 Create a pairlist of a specified length.
SEXP Rf_allocS4Object (void)
 Create an S4 object.
SEXP Rf_allocSExp (SEXPTYPE t)
 Create an object of a type derived from pairlist element.
SEXP Rf_allocVector3 (SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
R_xlen_t Rf_any_duplicated (SEXP x, Rboolean from_last)
R_xlen_t Rf_any_duplicated3 (SEXP x, SEXP incomp, Rboolean from_last)
SEXP Rf_applyClosure (SEXP call, SEXP op, SEXP arglist, SEXP rho, SEXP suppliedvars)
SEXP Rf_arraySubscript (int dim, SEXP s, SEXP dims, SEXP(*)(SEXP, SEXP dng), SEXP(*)(SEXP, int strg), SEXP x)
SEXP Rf_classgets (SEXP vec, SEXP klass)
SEXP Rf_cons (SEXP car, SEXP cdr)
 Creates a pairlist with a specified car and tail.
void Rf_copyMatrix (SEXP s, SEXP t, Rboolean byrow)
void Rf_copyListMatrix (SEXP s, SEXP t, Rboolean byrow)
void Rf_copyMostAttrib (SEXP inp, SEXP ans)
 Copy attributes, with some exceptions.
void Rf_copyVector (SEXP s, SEXP t)
int Rf_countContexts (int ctxttype, int browser)
SEXP Rf_CreateTag (SEXP x)
void Rf_defineVar (SEXP symbol, SEXP value, SEXP rho)
SEXP Rf_dimgets (SEXP vec, SEXP val)
SEXP Rf_dimnamesgets (SEXP vec, SEXP val)
SEXP Rf_DropDims (SEXP x)
SEXP Rf_duplicate (SEXP s)
SEXP Rf_shallow_duplicate (SEXP s)
SEXP Rf_lazy_duplicate (SEXP s)
SEXP Rf_duplicated (SEXP x, Rboolean from_last)
Rboolean R_envHasNoSpecialSymbols (SEXP env)
SEXP Rf_eval (SEXP e, SEXP rho)
 Evaluate an object in a specified Environment.
SEXP Rf_findFun (SEXP symbol, SEXP rho)
void Rf_findFunctionForBody (SEXP body)
SEXP Rf_findVar (SEXP symbol, SEXP rho)
 Find the binding of a symbol in an environment and its enclosing environments.
SEXP Rf_findVarInFrame (SEXP rho, SEXP symbol)
SEXP Rf_findVarInFrame3 (SEXP rho, SEXP symbol, Rboolean doGet)
 Find the binding for a symbol in a single environment.
SEXP Rf_getAttrib (SEXP vec, SEXP name)
 Access a named attribute.
SEXP Rf_GetArrayDimnames (SEXP x)
SEXP Rf_GetColNames (SEXP dimnames)
void Rf_GetMatrixDimnames (SEXP x, SEXP *rl, SEXP *cl, const char **rn, const char **cn)
SEXP Rf_GetOption (SEXP tag, SEXP rho)
SEXP Rf_GetOption1 (SEXP tag)
int Rf_GetOptionDigits (void)
int Rf_GetOptionWidth (void)
SEXP Rf_GetRowNames (SEXP dimnames)
void Rf_gsetVar (SEXP symbol, SEXP value, SEXP rho)
SEXP Rf_install (const char *name)
 Get a pointer to a regular Symbol object.
SEXP Rf_installChar (SEXP charSXP)
SEXP Rf_installDDVAL (int i)
SEXP Rf_installS3Signature (const char *, const char *)
Rboolean Rf_isFree (SEXP val)
Rboolean Rf_isOrdered (SEXP s)
Rboolean Rf_isUnmodifiedSpecSym (SEXP sym, SEXP env)
Rboolean Rf_isUnordered (SEXP s)
Rboolean Rf_isUnsorted (SEXP x, Rboolean strictly)
SEXP Rf_lengthgets (SEXP x, R_len_t len)
SEXP Rf_xlengthgets (SEXP x, R_xlen_t len)
SEXP R_lsInternal (SEXP env, Rboolean all)
SEXP R_lsInternal3 (SEXP env, Rboolean all, Rboolean sorted)
SEXP Rf_match (SEXP itable, SEXP ix, int nmatch)
SEXP Rf_matchE (SEXP itable, SEXP ix, int nmatch, SEXP env)
SEXP Rf_namesgets (SEXP vec, SEXP val)
SEXP Rf_mkChar (const char *name)
 Get a pointer to a CHARSXP object.
SEXP Rf_mkCharLen (const char *name, int len)
 Create a CHARSXP object for specified text.
Rboolean Rf_NonNullStringMatch (SEXP s, SEXP t)
int Rf_ncols (SEXP s)
int Rf_nrows (SEXP s)
SEXP Rf_nthcdr (SEXP s, int n)
int R_nchar (SEXP string, nchar_type type_, Rboolean allowNA, Rboolean keepNA, const char *msg_name)
Rboolean Rf_pmatch (SEXP formal, SEXP tag, Rboolean exact)
Rboolean Rf_psmatch (const char *f, const char *t, Rboolean exact)
void Rf_PrintValue (SEXP s)
void Rf_readS3VarsFromFrame (SEXP, SEXP *, SEXP *, SEXP *, SEXP *, SEXP *, SEXP *)
SEXP Rf_setAttrib (SEXP vec, SEXP name, SEXP val)
 Set or remove a named attribute.
void Rf_setSVector (SEXP *vec, int len, SEXP val)
void Rf_setVar (SEXP symbol, SEXP value, SEXP rho)
SEXP Rf_stringSuffix (SEXP string, int fromIndex)
SEXPTYPE Rf_str2type (const char *s)
Rboolean Rf_StringBlank (SEXP x)
SEXP Rf_substitute (SEXP lang, SEXP rho)
const char * Rf_translateChar (SEXP x)
const char * Rf_translateChar0 (SEXP x)
const char * Rf_translateCharUTF8 (SEXP x)
 Convert contents of a CHARSXP to UTF8.
const char * Rf_type2char (SEXPTYPE t)
 Name of type within R.
SEXP Rf_type2rstr (SEXPTYPE t)
SEXP Rf_type2str (SEXPTYPE t)
SEXP Rf_type2str_nowarn (SEXPTYPE t)
void Rf_unprotect_ptr (SEXP s)
 Remove entry from pointer protection stack.
void NORET R_signal_protect_error (void)
void NORET R_signal_unprotect_error (void)
void NORET R_signal_reprotect_error (PROTECT_INDEX i)
SEXP R_tryEval (SEXP e, SEXP env, int *ErrorOccurred)
SEXP R_tryEvalSilent (SEXP e, SEXP env, int *ErrorOccurred)
const char * R_curErrorBuf ()
Rboolean Rf_isS4 (SEXP s)
SEXP Rf_asS4 (SEXP s, Rboolean flag, int complete)
SEXP Rf_S3Class (SEXP obj)
int Rf_isBasicClass (const char *ss)
Rboolean R_cycle_detected (SEXP s, SEXP child)
cetype_t Rf_getCharCE (SEXP x)
SEXP Rf_mkCharCE (const char *name, cetype_t enc)
 Get a pointer to a CHARSXP object.
SEXP Rf_mkCharLenCE (const char *name, int len, cetype_t enc)
 Create a CHARSXP object for specified text and encoding.
const char * Rf_reEnc (const char *x, cetype_t ce_in, cetype_t ce_out, int subst)
SEXP R_forceAndCall (SEXP e, int n, SEXP rho)
SEXP R_MakeExternalPtr (void *p, SEXP tag, SEXP prot)
 Create an external pointer object.
void * R_ExternalPtrAddr (SEXP s)
 Get the encapsulated external pointer.
SEXP R_ExternalPtrTag (SEXP s)
 Get pointer to tag object.
SEXP R_ExternalPtrProtected (SEXP s)
 Get pointer to protege object.
void R_ClearExternalPtr (SEXP s)
 Reset the encapsulated pointer to R_NilValue.
void R_SetExternalPtrAddr (SEXP s, void *p)
 Set the value of the encapsulated pointer.
void R_SetExternalPtrTag (SEXP s, SEXP tag)
 Designate the tag object.
void R_SetExternalPtrProtected (SEXP s, SEXP p)
 Designate the protege object.
void R_RegisterFinalizer (SEXP s, SEXP fun)
void R_RegisterCFinalizer (SEXP s, R_CFinalizer_t fun)
void R_RegisterFinalizerEx (SEXP s, SEXP fun, Rboolean onexit)
void R_RegisterCFinalizerEx (SEXP s, R_CFinalizer_t fun, Rboolean onexit)
void R_RunPendingFinalizers (void)
SEXP R_MakeWeakRef (SEXP key, SEXP val, SEXP fin, Rboolean onexit)
SEXP R_MakeWeakRefC (SEXP key, SEXP val, R_CFinalizer_t fin, Rboolean onexit)
SEXP R_WeakRefKey (SEXP w)
SEXP R_WeakRefValue (SEXP w)
void R_RunWeakRefFinalizer (SEXP w)
SEXP R_PromiseExpr (SEXP p)
SEXP R_ClosureExpr (SEXP p)
void R_initialize_bcode (void)
SEXP R_bcEncode (SEXP bytes)
SEXP R_bcDecode (SEXP code)
void R_registerBC (SEXP bcBytes, SEXP bcode)
Rboolean R_checkConstants (Rboolean abortOnError)
Rboolean R_ToplevelExec (void(*fun)(void *), void *data)
SEXP R_ExecWithCleanup (SEXP(*fun)(void *), void *data, void(*cleanfun)(void *), void *cleandata)
void R_RestoreHashCount (SEXP rho)
Rboolean R_IsPackageEnv (SEXP rho)
SEXP R_PackageEnvName (SEXP rho)
SEXP R_FindPackageEnv (SEXP info)
Rboolean R_IsNamespaceEnv (SEXP rho)
SEXP R_NamespaceEnvSpec (SEXP rho)
SEXP R_FindNamespace (SEXP info)
void R_LockEnvironment (SEXP env, Rboolean bindings)
Rboolean R_EnvironmentIsLocked (SEXP env)
void R_LockBinding (SEXP sym, SEXP env)
void R_unLockBinding (SEXP sym, SEXP env)
void R_MakeActiveBinding (SEXP sym, SEXP fun, SEXP env)
Rboolean R_BindingIsLocked (SEXP sym, SEXP env)
Rboolean R_BindingIsActive (SEXP sym, SEXP env)
Rboolean R_HasFancyBindings (SEXP rho)
void Rf_errorcall (SEXP, const char *,...)
void Rf_warningcall (SEXP call, const char *format,...)
void Rf_warningcall_immediate (SEXP call, const char *format,...)
void R_XDREncodeDouble (double d, void *buf)
double R_XDRDecodeDouble (void *buf)
void R_XDREncodeInteger (int i, void *buf)
int R_XDRDecodeInteger (void *buf)
void R_InitInPStream (R_inpstream_t stream, R_pstream_data_t data, R_pstream_format_t type, int(*inchar)(R_inpstream_t), void(*inbytes)(R_inpstream_t, void *, int), SEXP(*phook)(SEXP, SEXP), SEXP pdata)
void R_InitOutPStream (R_outpstream_t stream, R_pstream_data_t data, R_pstream_format_t type, int version, void(*outchar)(R_outpstream_t, int), void(*outbytes)(R_outpstream_t, void *, int), SEXP(*phook)(SEXP, SEXP), SEXP pdata)
void R_InitFileInPStream (R_inpstream_t stream, FILE *fp, R_pstream_format_t type, SEXP(*phook)(SEXP, SEXP), SEXP pdata)
void R_InitFileOutPStream (R_outpstream_t stream, FILE *fp, R_pstream_format_t type, int version, SEXP(*phook)(SEXP, SEXP), SEXP pdata)
void R_Serialize (SEXP s, R_outpstream_t ops)
SEXP R_Unserialize (R_inpstream_t ips)
SEXP R_do_slot (SEXP obj, SEXP name)
SEXP R_do_slot_assign (SEXP obj, SEXP name, SEXP value)
int R_has_slot (SEXP obj, SEXP name)
SEXP R_S4_extends (SEXP klass, SEXP useTable)
SEXP R_do_MAKE_CLASS (const char *what)
SEXP R_getClassDef (const char *what)
SEXP R_getClassDef_R (SEXP what)
Rboolean R_has_methods_attached (void)
Rboolean R_isVirtualClass (SEXP class_def, SEXP env)
Rboolean R_extends (SEXP class1, SEXP class2, SEXP env)
SEXP R_do_new_object (SEXP class_def)
int R_check_class_and_super (SEXP x, const char **valid, SEXP rho)
int R_check_class_etc (SEXP x, const char **valid)
void R_PreserveObject (SEXP object)
 Protect object against garbage collection.
void R_ReleaseObject (SEXP object)
 Remove object's protection against garbage collection.
void R_dot_Last (void)
void R_RunExitFinalizers (void)
int R_system (const char *command)
Rboolean R_compute_identical (SEXP x, SEXP y, int flags)
SEXP R_body_no_src (SEXP x)
void R_orderVector (int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean decreasing)
void R_orderVector1 (int *indx, int n, SEXP x, Rboolean nalast, Rboolean decreasing)
SEXP Rf_allocVector (SEXPTYPE, R_xlen_t)
 Create a vector object.
Rboolean Rf_conformable (SEXP, SEXP)
SEXP Rf_elt (SEXP, int)
Rboolean Rf_inherits (SEXP, const char *)
Rboolean Rf_isArray (SEXP)
Rboolean Rf_isFactor (SEXP)
Rboolean Rf_isFrame (SEXP)
Rboolean Rf_isFunction (SEXP)
Rboolean Rf_isInteger (SEXP)
Rboolean Rf_isLanguage (SEXP)
Rboolean Rf_isList (SEXP)
Rboolean Rf_isMatrix (SEXP)
Rboolean Rf_isNewList (SEXP)
Rboolean Rf_isNumber (SEXP)
Rboolean Rf_isNumeric (SEXP)
Rboolean Rf_isPairList (SEXP)
Rboolean Rf_isPrimitive (SEXP)
Rboolean Rf_isTs (SEXP)
Rboolean Rf_isUserBinop (SEXP)
Rboolean Rf_isValidString (SEXP)
Rboolean Rf_isValidStringF (SEXP)
Rboolean Rf_isVector (SEXP)
 Is an R value a vector?
Rboolean Rf_isVectorAtomic (SEXP)
Rboolean Rf_isVectorList (SEXP)
Rboolean Rf_isVectorizable (SEXP)
SEXP Rf_lang1 (SEXP)
SEXP Rf_lang2 (SEXP, SEXP)
SEXP Rf_lang3 (SEXP, SEXP, SEXP)
SEXP Rf_lang4 (SEXP, SEXP, SEXP, SEXP)
SEXP Rf_lang5 (SEXP, SEXP, SEXP, SEXP, SEXP)
SEXP Rf_lang6 (SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)
SEXP Rf_lastElt (SEXP)
SEXP Rf_lcons (SEXP, SEXP)
 Create an Expression with a specified car and tail.
R_len_t Rf_length (SEXP)
SEXP Rf_list1 (SEXP)
SEXP Rf_list2 (SEXP, SEXP)
SEXP Rf_list3 (SEXP, SEXP, SEXP)
SEXP Rf_list4 (SEXP, SEXP, SEXP, SEXP)
SEXP Rf_list5 (SEXP, SEXP, SEXP, SEXP, SEXP)
SEXP Rf_list6 (SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)
SEXP Rf_listAppend (SEXP, SEXP)
SEXP Rf_mkNamed (SEXPTYPE, const char **)
SEXP Rf_mkString (const char *)
int Rf_nlevels (SEXP)
int Rf_stringPositionTr (SEXP, const char *)
SEXP Rf_ScalarComplex (Rcomplex)
SEXP Rf_ScalarInteger (int)
SEXP Rf_ScalarLogical (int)
SEXP Rf_ScalarRaw (Rbyte)
SEXP Rf_ScalarReal (double)
SEXP Rf_ScalarString (SEXP)
R_xlen_t Rf_xlength (SEXP)
SEXP Rf_protect (SEXP)
void Rf_unprotect (int)
void R_ProtectWithIndex (SEXP, PROTECT_INDEX *)
void R_Reprotect (SEXP, PROTECT_INDEX)
SEXP R_FixupRHS (SEXP x, SEXP y)

Variables

LibExtern SEXP R_GlobalEnv
LibExtern SEXP R_EmptyEnv
LibExtern SEXP R_BaseEnv
LibExtern SEXP R_BaseNamespace
LibExtern SEXP R_NamespaceRegistry
LibExtern SEXP R_Srcref
LibExtern SEXP R_NilValue
LibExtern SEXP R_UnboundValue
LibExtern SEXP R_MissingArg
SEXP R_RestartToken
LibExtern SEXP R_baseSymbol
LibExtern SEXP R_BaseSymbol
LibExtern SEXP R_BraceSymbol
LibExtern SEXP R_Bracket2Symbol
LibExtern SEXP R_BracketSymbol
LibExtern SEXP R_ClassSymbol
LibExtern SEXP R_DeviceSymbol
LibExtern SEXP R_DimNamesSymbol
LibExtern SEXP R_DimSymbol
LibExtern SEXP R_DollarSymbol
LibExtern SEXP R_DotsSymbol
LibExtern SEXP R_DoubleColonSymbol
LibExtern SEXP R_DropSymbol
LibExtern SEXP R_LastvalueSymbol
LibExtern SEXP R_LevelsSymbol
LibExtern SEXP R_ModeSymbol
LibExtern SEXP R_NaRmSymbol
LibExtern SEXP R_NameSymbol
LibExtern SEXP R_NamesSymbol
LibExtern SEXP R_NamespaceEnvSymbol
LibExtern SEXP R_PackageSymbol
LibExtern SEXP R_PreviousSymbol
LibExtern SEXP R_QuoteSymbol
LibExtern SEXP R_RowNamesSymbol
LibExtern SEXP R_SeedsSymbol
LibExtern SEXP R_SortListSymbol
LibExtern SEXP R_SourceSymbol
LibExtern SEXP R_SpecSymbol
LibExtern SEXP R_TripleColonSymbol
LibExtern SEXP R_TspSymbol
LibExtern SEXP R_dot_defined
LibExtern SEXP R_dot_Method
LibExtern SEXP R_dot_packageName
LibExtern SEXP R_dot_target
LibExtern SEXP R_dot_Generic
LibExtern SEXP R_NaString
LibExtern SEXP R_BlankString
LibExtern SEXP R_BlankScalarString

Define Documentation

#define allocArray   Rf_allocArray
#define allocList   Rf_allocList
#define allocSExp   Rf_allocSExp
#define ANYSXP
Value:
18    /* make "any" args work.
                 Used in specifying types for symbol
                 registration to mean anything is okay  */
#define asChar   Rf_asChar
#define asComplex   Rf_asComplex
#define asInteger   Rf_asInteger
#define asLogical   Rf_asLogical
#define asReal   Rf_asReal
#define asS4   Rf_asS4
#define BCODE_CODE (   x)    CAR(x)
#define BCODE_CONSTS (   x)    CDR(x)
#define BCODE_EXPR (   x)    TAG(x)
#define BCODESXP   21 /* byte code */
#define BODY_EXPR (   e)    R_ClosureExpr(e)
#define BUILTINSXP   8 /* builtin non-special forms */
#define CHAR (   x)    R_CHAR(x)
#define CHARSXP   9 /* "scalar" string type (internal only)*/
#define classgets   Rf_classgets
#define CLOSXP   3 /* closures */
#define CONS (   a,
 
)    cons((a), (b)) /* data lists */
#define cons   Rf_cons
#define copyMatrix   Rf_copyMatrix
#define copyVector   Rf_copyVector
#define CPLXSXP   15 /* complex variables */
#define CreateTag   Rf_CreateTag
#define DECREMENT_REFCNT (   x)    do {} while(0)
#define defineVar   Rf_defineVar
#define dimgets   Rf_dimgets
#define DISABLE_REFCNT (   x)    SET_TRACKREFS(x, FALSE)
#define DOTSXP   17 /* dot-dot-dot object */
#define DropDims   Rf_DropDims
#define duplicate   Rf_duplicate
#define duplicated   Rf_duplicated
#define elt   Rf_elt
#define ENABLE_REFCNT (   x)    SET_TRACKREFS(x, TRUE)
#define ENVSXP   4 /* environments */
#define error_return (   msg)    { Rf_error(msg); return R_NilValue; }
#define errorcall   Rf_errorcall
#define errorcall_return (   cl,
  msg 
)    { Rf_errorcall(cl, msg); return R_NilValue; }
#define eval   Rf_eval
#define EXPRSXP   20 /* expressions vectors */
#define EXTPTR_PROT (   x)    CDR(x)
#define EXTPTR_PTR (   x)    CAR(x)
#define EXTPTR_TAG (   x)    TAG(x)
#define EXTPTRSXP   22 /* external pointer */
#define findFun   Rf_findFun
#define findVar   Rf_findVar
#define FREESXP   31 /* node released by GC */
#define FUNSXP   99 /* Closure or Builtin or Special */
#define getAttrib   Rf_getAttrib
#define getCharCE   Rf_getCharCE
#define GetOption   Rf_GetOption
#define GetOption1   Rf_GetOption1
#define gsetVar   Rf_gsetVar
#define INCREMENT_NAMED (   x)
Value:
do {                \
    SEXP __x__ = (x);               \
    if (NAMED(__x__) != NAMEDMAX)           \
        SET_NAMED(__x__, NAMED(__x__) + 1);     \
    } while (0)
#define INCREMENT_REFCNT (   x)    do {} while(0)
#define inherits   Rf_inherits
#define INLINE_PROTECT
#define install   Rf_install
#define INTSXP   13 /* integer vectors */
#define IS_GETTER_CALL (   call)    (CADR(call) == R_TmpvalSymbol)
#define IS_SCALAR (   x,
  type 
)    (TYPEOF(x) == (type) && XLENGTH(x) == 1)
#define IS_SIMPLE_SCALAR (   x,
  type 
)    (IS_SCALAR(x, type) && ATTRIB(x) == R_NilValue)
#define isArray   Rf_isArray
#define isByteCode (   x)    (TYPEOF(x)==BCODESXP)
#define isComplex   Rf_isComplex
#define isFactor   Rf_isFactor
#define isFrame   Rf_isFrame
#define isFree   Rf_isFree
#define isFunction   Rf_isFunction
#define isInteger   Rf_isInteger
#define isLanguage   Rf_isLanguage
#define isList   Rf_isList
#define isLogical   Rf_isLogical
#define isMatrix   Rf_isMatrix
#define isNewList   Rf_isNewList
#define isNull   Rf_isNull
#define isNumber   Rf_isNumber
#define isNumeric   Rf_isNumeric
#define isObject   Rf_isObject
#define isOrdered   Rf_isOrdered
#define isPairList   Rf_isPairList
#define isReal   Rf_isReal
#define isS4   Rf_isS4
#define isString   Rf_isString
#define isSymbol   Rf_isSymbol
#define isTs   Rf_isTs
#define isUnsorted   Rf_isUnsorted
#define isVector   Rf_isVector
#define lang1   Rf_lang1
#define lang2   Rf_lang2
#define lang3   Rf_lang3
#define lang4   Rf_lang4
#define lang5   Rf_lang5
#define lang6   Rf_lang6
#define LANGSXP   6 /* language constructs (special lists) */
#define lastElt   Rf_lastElt
#define LCONS (   a,
 
)    lcons((a), (b)) /* language lists */
#define lcons   Rf_lcons
#define length (   x)    Rf_length(x)
#define lengthgets   Rf_lengthgets
#define LGLSXP   10 /* logical vectors */
#define list1   Rf_list1
#define list2   Rf_list2
#define list3   Rf_list3
#define list4   Rf_list4
#define list5   Rf_list5
#define list6   Rf_list6
#define listAppend   Rf_listAppend
#define LISTSXP   2 /* lists of dotted pairs */
#define MARK_NOT_MUTABLE (   x)    SET_NAMED(x, NAMEDMAX)
#define match   Rf_match
#define matchE   Rf_matchE
#define MAX_NUM_SEXPTYPE   (1<<TYPE_BITS)
#define MAYBE_REFERENCED (   x)    (! NO_REFERENCES(x))
#define MAYBE_SHARED (   x)    (NAMED(x) > 1)
#define mkChar   Rf_mkChar
#define mkCharCE   Rf_mkCharCE
#define mkCharLen   Rf_mkCharLen
#define mkNamed   Rf_mkNamed
#define mkString   Rf_mkString
#define NA_STRING   R_NaString
#define NAMEDMAX   2
#define namesgets   Rf_namesgets
#define ncols   Rf_ncols
#define NEWSXP   30 /* fresh node created in new page */
#define NILSXP   0 /* nil = NULL */
#define nlevels   Rf_nlevels
#define NO_REFERENCES (   x)    (NAMED(x) == 0)
#define NOT_SHARED (   x)    (! MAYBE_SHARED(x))
#define nrows   Rf_nrows
#define nthcdr   Rf_nthcdr
#define pmatch   Rf_pmatch
#define PREXPR (   e)    R_PromiseExpr(e)
#define PrintValue   Rf_PrintValue
#define PROMSXP   5 /* promises: [un]evaluated closure arguments */
#define PROTECT (   s)    Rf_protect(s)
#define protect   Rf_protect
#define PROTECT_WITH_INDEX (   x,
 
)    R_ProtectWithIndex(x,i)
#define psmatch   Rf_psmatch
#define R_LEN_T_MAX   INT_MAX
#define R_LONG_VEC_TOKEN   -1
#define R_SHORT_LEN_MAX   2147483647
#define R_XDR_DOUBLE_SIZE   8
#define R_XDR_INTEGER_SIZE   4
#define R_XLEN_T_MAX   4503599627370496
#define RAWSXP   24 /* raw bytes */
#define REALSXP   14 /* real variables */
#define reEnc   Rf_reEnc
#define REPROTECT (   x,
 
)    R_Reprotect(x,i)
#define rownamesgets   Rf_rownamesgets
#define S3Class   Rf_S3Class
#define S4SXP   25 /* S4, non-vector */
#define ScalarRaw   Rf_ScalarRaw
#define ScalarReal   Rf_ScalarReal
#define SET_REFCNT (   x,
 
)    do {} while(0)
#define SET_TRACKREFS (   x,
 
)    do {} while(0)
#define setAttrib   Rf_setAttrib
#define setSVector   Rf_setSVector
#define setVar   Rf_setVar
#define SPECIALSXP   7 /* special forms */
#define str2type   Rf_str2type
#define STRSXP   16 /* string vectors */
#define substitute   Rf_substitute
#define SYMSXP   1 /* symbols */
#define topenv   Rf_topenv
#define type2char   Rf_type2char
#define type2rstr   Rf_type2rstr
#define type2str   Rf_type2str
#define TYPE_BITS   5
#define UNPROTECT (   n)    Rf_unprotect(n)
#define unprotect   Rf_unprotect
#define UNPROTECT_PTR (   s)    Rf_unprotect_ptr(s)
#define VECSXP   19 /* generic vectors */
#define WEAKREFSXP   23 /* weak reference */
#define xlength (   x)    Rf_xlength(x)

Typedef Documentation

typedef int PROTECT_INDEX
typedef struct R_allocator R_allocator_t
typedef void(* R_CFinalizer_t)(SEXP)
typedef struct R_inpstream_st* R_inpstream_t
typedef int R_len_t
typedef void* R_pstream_data_t
typedef ptrdiff_t R_xlen_t
typedef unsigned char Rbyte
typedef struct SEXPREC* SEXP
typedef unsigned int SEXPTYPE

Enumeration Type Documentation

enum cetype_t
Enumerator:
CE_NATIVE 
CE_UTF8 
CE_LATIN1 
CE_BYTES 
CE_SYMBOL 
CE_ANY 
             {
    CE_NATIVE = 0,
    CE_UTF8   = 1,
    CE_LATIN1 = 2,
    CE_BYTES  = 3,
    CE_SYMBOL = 5,
enum nchar_type
Enumerator:
Bytes 
Chars 
Width 
Enumerator:
R_pstream_any_format 
R_pstream_ascii_format 
R_pstream_binary_format 
R_pstream_xdr_format 
R_pstream_asciihex_format 

Function Documentation

SEXP() ATTRIB ( SEXP  x)

Get the attributes of an R value.

Parameters:
xPointer to the value whose attributes are required.
Returns:
Pointer to the attributes object of x , which will either be a pairlist or R_NilValue.
SEXP() BODY ( SEXP  x)

Access the body of a closure.

Parameters:
xPointer to a closure object.
Returns:
Pointer to the body of x.
SEXP() CAAR ( SEXP  e)

Equivalent to CAR(CAR(e)).

SEXP() CAD4R ( SEXP  e)

Equivalent to CAR(CDR(CDR(CDR(CDR(e))))).

SEXP() CADDDR ( SEXP  e)

Equivalent to CAR(CDR(CDR(CDR(e)))).

SEXP() CADDR ( SEXP  e)

Equivalent to CAR(CDR(CDR(e))).

SEXP() CADR ( SEXP  e)

Equivalent to CAR(CDR(e)).

SEXP() CAR ( SEXP  e)

Get car of pairlist element.

Parameters:
ePointer to a pairlist element, or R_NilValue.
Returns:
Pointer to the value of the list car, or 0 if e is R_NilValue.
SEXP() CDAR ( SEXP  e)

Equivalent to CDR(CAR(e)).

SEXP() CDDDR ( SEXP  e)

Equivalent to CDR(CDR(CDR(e))).

SEXP() CDDR ( SEXP  e)

Equivalent to CDR(CDR(e)).

SEXP() CDR ( SEXP  e)

Get tail of pairlist element.

Parameters:
ePointer to a pairlist element, or R_NilValue.
Returns:
Pointer to the tail of the list, or 0 if e is R_NilValue.
SEXP() CLOENV ( SEXP  x)

Access the environment of a closure.

Parameters:
xPointer to a closure object.
Returns:
Pointer to the environment of x.
Rcomplex*() COMPLEX ( SEXP  x)
Parameters:
xPointer to a complex vector.
Returns:
Pointer to the first element of x .
SEXP CONS_NR ( SEXP  a,
SEXP  b 
)
int() DDVAL ( SEXP  x)

Does symbol relate to a ... expression?

Parameters:
xPointer to a symbol.
Returns:
TRUE iff this symbol denotes an element of a ... expression.
void DUPLICATE_ATTRIB ( SEXP  to,
SEXP  from 
)

Replace the attributes of to by those of from.

The status of to as an S4 Object is also copied from from .

Parameters:
toPointer to a R value.
fromPointer to another R Value.
SEXP() ENCLOS ( SEXP  x)

Access enclosing environment.

Parameters:
xPointer to an environment.
Returns:
Pointer to the enclosing environment of x .
int() ENVFLAGS ( SEXP  x)
SEXP() FORMALS ( SEXP  x)

Access formal arguments of a closure.

Parameters:
xPointer to a closure object.
Returns:
Pointer to the formal argument list of x.
SEXP() FRAME ( SEXP  x)

Access an environment's Frame, represented as a pairlist.

Parameters:
xPointer to an environment.
Returns:
Pointer to a pairlist representing the contents of the Frame of x (may be R_NilValue).
int() HASHASH ( SEXP  x)
SEXP() HASHTAB ( SEXP  x)
int() HASHVALUE ( SEXP  x)
int*() INTEGER ( SEXP  x)
Parameters:
xPointer to an IntVector or a LogicalVector (i.e. an R integer or logical vector).
Returns:
Pointer to the first element of x .
SEXP() INTERNAL ( SEXP  x)

Get function accessed via .Internal().

Parameters:
xPointer to a symbol.
Returns:
If x is associated with a function invoked in R via .Internal(), then a pointer to the appropriate function, otherwise R_NilValue.
int() IS_LONG_VEC ( SEXP  x)
int() IS_S4_OBJECT ( SEXP  x)

Is this an S4 object?

Parameters:
xPointer to a R value.
Returns:
true iff x is an S4 object.
int() LENGTH ( SEXP  x)
int() LEVELS ( SEXP  x)
int*() LOGICAL ( SEXP  x)
Parameters:
xPointer to a logical vector.
Returns:
Pointer to the first element of x .
int() MARK ( SEXP  x)
int() MISSING ( SEXP  x)
int() NAMED ( SEXP  x)

Get object copying status.

Parameters:
xPointer to a R value.
Returns:
Refer to 'R Internals' document.
int() OBJECT ( SEXP  x)

Does an value have a class attribute?

Parameters:
xPointer to an R object.
Returns:
true iff x has a class attribute.
SEXP() PRCODE ( SEXP  x)

Access the expression of a promise.

Parameters:
xPointer to a promise.
Returns:
Pointer to the expression to be evaluated by the promise.
SEXP() PRENV ( SEXP  x)

Access the environment of a promise.

Parameters:
xPointer to a promise.
Returns:
Pointer to the environment in which the promise is to be evaluated. Set to R_NilValue when the promise has been evaluated.
SEXP() PRINTNAME ( SEXP  x)

Symbol name.

Parameters:
xPointer to a symbol.
Returns:
Pointer to a CHARSXP representing x's name.
int() PRSEEN ( SEXP  x)
SEXP() PRVALUE ( SEXP  x)

Access the value of a promise.

Parameters:
xPointer to a promise.
Returns:
Pointer to the value of the promise, or to R_UnboundValue if it has not yet been evaluated..
R_len_t NORET R_BadLongVector ( SEXP  ,
const char *  ,
int   
)
SEXP R_bcDecode ( SEXP  code)
SEXP R_bcEncode ( SEXP  bytes)
Rboolean R_BindingIsActive ( SEXP  sym,
SEXP  env 
)
Rboolean R_BindingIsLocked ( SEXP  sym,
SEXP  env 
)
const char*() R_CHAR ( SEXP  x)

Access the content of CHARSXP as a C-style string.

Parameters:
xpointer to a CHARSXP .
Returns:
const pointer to character 0 of x .
int R_check_class_and_super ( SEXP  x,
const char **  valid,
SEXP  rho 
)
int R_check_class_etc ( SEXP  x,
const char **  valid 
)
Rboolean R_checkConstants ( Rboolean  abortOnError)
void R_ClearExternalPtr ( SEXP  s)

Reset the encapsulated pointer to R_NilValue.

Parameters:
sPointer to an external pointer object.
Rboolean R_compute_identical ( SEXP  x,
SEXP  y,
int  flags 
)
const char* R_curErrorBuf ( )
Rboolean R_cycle_detected ( SEXP  s,
SEXP  child 
)
SEXP R_do_MAKE_CLASS ( const char *  what)
SEXP R_do_new_object ( SEXP  class_def)
SEXP R_do_slot ( SEXP  obj,
SEXP  name 
)
SEXP R_do_slot_assign ( SEXP  obj,
SEXP  name,
SEXP  value 
)
void R_dot_Last ( void  )
SEXP R_ExecWithCleanup ( SEXP(*)(void *)  fun,
void *  data,
void(*)(void *)  cleanfun,
void *  cleandata 
)
Rboolean R_extends ( SEXP  class1,
SEXP  class2,
SEXP  env 
)
void* R_ExternalPtrAddr ( SEXP  s)

Get the encapsulated external pointer.

Parameters:
sPointer to an external pointer object.
Returns:
the external pointer encapsulated by s.

Get pointer to protege object.

Parameters:
sPointer to an external pointer object.
Returns:
a pointer to the protege object of s.

Get pointer to tag object.

Parameters:
sPointer to an external pointer object.
Returns:
a pointer to the tag object of s.
SEXP R_FixupRHS ( SEXP  x,
SEXP  y 
)
SEXP R_forceAndCall ( SEXP  e,
int  n,
SEXP  rho 
)
SEXP R_getClassDef ( const char *  what)
SEXP R_GetCurrentSrcref ( int  skip)
SEXP R_GetSrcFilename ( SEXP  srcref)
int R_has_slot ( SEXP  obj,
SEXP  name 
)
void R_InitFileInPStream ( R_inpstream_t  stream,
FILE *  fp,
R_pstream_format_t  type,
SEXP(*)(SEXP, SEXP phook,
SEXP  pdata 
)
void R_InitFileOutPStream ( R_outpstream_t  stream,
FILE *  fp,
R_pstream_format_t  type,
int  version,
SEXP(*)(SEXP, SEXP phook,
SEXP  pdata 
)
void R_initialize_bcode ( void  )
void R_InitInPStream ( R_inpstream_t  stream,
R_pstream_data_t  data,
R_pstream_format_t  type,
int(*)(R_inpstream_t inchar,
void(*)(R_inpstream_t, void *, int)  inbytes,
SEXP(*)(SEXP, SEXP phook,
SEXP  pdata 
)
void R_InitOutPStream ( R_outpstream_t  stream,
R_pstream_data_t  data,
R_pstream_format_t  type,
int  version,
void(*)(R_outpstream_t, int)  outchar,
void(*)(R_outpstream_t, void *, int)  outbytes,
SEXP(*)(SEXP, SEXP phook,
SEXP  pdata 
)
Rboolean R_isVirtualClass ( SEXP  class_def,
SEXP  env 
)
void R_LockBinding ( SEXP  sym,
SEXP  env 
)
void R_LockEnvironment ( SEXP  env,
Rboolean  bindings 
)
SEXP R_lsInternal ( SEXP  env,
Rboolean  all 
)
SEXP R_lsInternal3 ( SEXP  env,
Rboolean  all,
Rboolean  sorted 
)
void R_MakeActiveBinding ( SEXP  sym,
SEXP  fun,
SEXP  env 
)
SEXP R_MakeExternalPtr ( void *  p,
SEXP  tag,
SEXP  prot 
)

Create an external pointer object.

Parameters:
pThe pointer that the external pointer object is to encapsulate. May be NULL.
tagPointer to the tag object. May be R_NilValue (and often is).
protPointer to the protege object. May be R_NilValue (and often is).
Returns:
Pointer to the created external pointer object.
SEXP R_MakeWeakRef ( SEXP  key,
SEXP  val,
SEXP  fin,
Rboolean  onexit 
)
SEXP R_MakeWeakRefC ( SEXP  key,
SEXP  val,
R_CFinalizer_t  fin,
Rboolean  onexit 
)
int R_nchar ( SEXP  string,
nchar_type  type_,
Rboolean  allowNA,
Rboolean  keepNA,
const char *  msg_name 
)
void R_orderVector ( int *  indx,
int  n,
SEXP  arglist,
Rboolean  nalast,
Rboolean  decreasing 
)
void R_orderVector1 ( int *  indx,
int  n,
SEXP  x,
Rboolean  nalast,
Rboolean  decreasing 
)
void R_PreserveObject ( SEXP  object)

Protect object against garbage collection.

This is intended for long-term protection, for which PROTECT() etc. would be inappropriate.

Parameters:
objectPointer to the object to be preserved. It is permissible for this to be R_NilValue.
void R_ProtectWithIndex ( SEXP  ,
PROTECT_INDEX  
)
void R_registerBC ( SEXP  bcBytes,
SEXP  bcode 
)
void R_RegisterCFinalizer ( SEXP  s,
R_CFinalizer_t  fun 
)
void R_RegisterCFinalizerEx ( SEXP  s,
R_CFinalizer_t  fun,
Rboolean  onexit 
)
void R_RegisterFinalizer ( SEXP  s,
SEXP  fun 
)
void R_RegisterFinalizerEx ( SEXP  s,
SEXP  fun,
Rboolean  onexit 
)
void R_ReleaseObject ( SEXP  object)

Remove object's protection against garbage collection.

Parameters:
objectPointer to the object whose protection is to be removed. It is permissible (but pointless) for this to be a pointer to an object that is not currently protected by R_PreserveObject(), but in that case R_ReleaseObject() has no effect.
void R_Reprotect ( SEXP  ,
PROTECT_INDEX   
)
void R_RestoreHashCount ( SEXP  rho)
void R_RunExitFinalizers ( void  )
void R_RunPendingFinalizers ( void  )
SEXP R_S4_extends ( SEXP  klass,
SEXP  useTable 
)
void R_Serialize ( SEXP  s,
R_outpstream_t  ops 
)
void R_SetExternalPtrAddr ( SEXP  s,
void *  p 
)

Set the value of the encapsulated pointer.

Parameters:
sPointer to an external pointer object.
pNew pointer value (may be NULL).
void R_SetExternalPtrProtected ( SEXP  s,
SEXP  p 
)

Designate the protege object.

Parameters:
sPointer to an external pointer object.
pPointer to the new protege object (or R_NilValue).
void R_SetExternalPtrTag ( SEXP  s,
SEXP  tag 
)

Designate the tag object.

Parameters:
sPointer to an external pointer object.
tagPointer to the new tag object (or R_NilValue).
void NORET R_signal_protect_error ( void  )
int R_system ( const char *  command)
Rboolean R_ToplevelExec ( void(*)(void *)  fun,
void *  data 
)
SEXP R_tryEval ( SEXP  e,
SEXP  env,
int *  ErrorOccurred 
)
SEXP R_tryEvalSilent ( SEXP  e,
SEXP  env,
int *  ErrorOccurred 
)
void R_unLockBinding ( SEXP  sym,
SEXP  env 
)
double R_XDRDecodeDouble ( void *  buf)
int R_XDRDecodeInteger ( void *  buf)
void R_XDREncodeDouble ( double  d,
void *  buf 
)
void R_XDREncodeInteger ( int  i,
void *  buf 
)
Rbyte*() RAW ( SEXP  x)
Parameters:
xPointer to a raw vector.
Returns:
Pointer to the first element of x .
int() RDEBUG ( SEXP  x)

Query debugging status.

Parameters:
xPointer to a closure object.
Returns:
true if debugging is set, i.e. evaluations of the function should run under the browser.
double*() REAL ( SEXP  x)
Parameters:
xPointer to a numeric vector.
Returns:
Pointer to the first element of x .
int() REFCNT ( SEXP  x)
char* Rf_acopy_string ( const char *  in)
void Rf_addMissingVarsToNewEnv ( SEXP  ,
SEXP   
)
SEXP Rf_alloc3DArray ( SEXPTYPE  mode,
int  nrow,
int  ncol,
int  nface 
)
SEXP Rf_allocArray ( SEXPTYPE  mode,
SEXP  dims 
)
SEXP Rf_allocFormalsList2 ( SEXP  sym1,
SEXP  sym2 
)
SEXP Rf_allocFormalsList3 ( SEXP  sym1,
SEXP  sym2,
SEXP  sym3 
)
SEXP Rf_allocFormalsList4 ( SEXP  sym1,
SEXP  sym2,
SEXP  sym3,
SEXP  sym4 
)
SEXP Rf_allocFormalsList5 ( SEXP  sym1,
SEXP  sym2,
SEXP  sym3,
SEXP  sym4,
SEXP  sym5 
)
SEXP Rf_allocFormalsList6 ( SEXP  sym1,
SEXP  sym2,
SEXP  sym3,
SEXP  sym4,
SEXP  sym5,
SEXP  sym6 
)
SEXP Rf_allocList ( int  n)

Create a pairlist of a specified length.

This constructor creates a pairlist with a specified number of elements. On creation, each element has 'car' and 'tag' set to R_NilValue.

Parameters:
nNumber of elements required in the list.
Returns:
The constructed list, or R_NilValue if n is zero.
SEXP Rf_allocMatrix ( SEXPTYPE  mode,
int  nrow,
int  ncol 
)
SEXP Rf_allocS4Object ( void  )

Create an S4 object.

Returns:
Pointer to the created object.

Create an object of a type derived from pairlist element.

The object is created with car, tag and tail pointers all set to R_NilValue.

Parameters:
tThe SEXPTYPE of the required object. Must be one of LISTSXP, LANGSXP, DOTSXP or BCODESXP.
Returns:
Pointer to the created object.

Create a vector object.

Allocate a vector object. This ensures only validity of SEXPTYPE values representing lists (as the elements must be initialized).

Parameters:
stypeThe type of vector required.
lengthThe length of the vector to be created.
Returns:
Pointer to the created vector.
SEXP Rf_allocVector3 ( SEXPTYPE  type,
R_xlen_t  length,
R_allocator_t allocator 
)
R_xlen_t Rf_any_duplicated ( SEXP  x,
Rboolean  from_last 
)
R_xlen_t Rf_any_duplicated3 ( SEXP  x,
SEXP  incomp,
Rboolean  from_last 
)
SEXP Rf_applyClosure ( SEXP  call,
SEXP  op,
SEXP  arglist,
SEXP  rho,
SEXP  suppliedvars 
)
SEXP Rf_arraySubscript ( int  dim,
SEXP  s,
SEXP  dims,
SEXP(*)(SEXP, SEXP dng)  ,
SEXP(*)(SEXP, int strg)  ,
SEXP  x 
)
int Rf_asInteger ( SEXP  x)
int Rf_asLogical ( SEXP  x)
double Rf_asReal ( SEXP  x)
SEXP Rf_asS4 ( SEXP  s,
Rboolean  flag,
int  complete 
)
SEXP Rf_classgets ( SEXP  vec,
SEXP  klass 
)
SEXP Rf_coerceVector ( SEXP  v,
SEXPTYPE  type 
)
SEXP Rf_cons ( SEXP  car,
SEXP  cdr 
)

Creates a pairlist with a specified car and tail.

This function protects its arguments from the garbage collector.

Parameters:
crPointer to the 'car' of the element to be created.
tlPointer to the 'tail' of the element to be created, which must be a pairlist or R_NilValue.
Returns:
Pointer to the constructed pairlist.
void Rf_copyListMatrix ( SEXP  s,
SEXP  t,
Rboolean  byrow 
)
void Rf_copyMatrix ( SEXP  s,
SEXP  t,
Rboolean  byrow 
)
void Rf_copyMostAttrib ( SEXP  inp,
SEXP  ans 
)

Copy attributes, with some exceptions.

This is called in the case of binary operations to copy most attributes from one of the input arguments to the output. Note that the Dim, Dimnames and Names attributes are not copied: these should have been assigned elsewhere. The function also copies the S4 object status.

Parameters:
inpPointer to the R value from which attributes are to be copied.
ansPointer to the R value to which attributes are to be copied.
Note:
The above documentation is probably incomplete: refer to the source code for further details.
void Rf_copyVector ( SEXP  s,
SEXP  t 
)
int Rf_countContexts ( int  ctxttype,
int  browser 
)
void Rf_defineVar ( SEXP  symbol,
SEXP  value,
SEXP  rho 
)
SEXP Rf_dimgets ( SEXP  vec,
SEXP  val 
)
SEXP Rf_dimnamesgets ( SEXP  vec,
SEXP  val 
)
SEXP Rf_duplicated ( SEXP  x,
Rboolean  from_last 
)
SEXP Rf_elt ( SEXP  ,
int   
)
void Rf_errorcall ( SEXP  ,
const char *  ,
  ... 
)
SEXP Rf_eval ( SEXP  e,
SEXP  rho 
)

Evaluate an object in a specified Environment.

Parameters:
ePointer to the object to be evaluated.
rhoPointer to an Environment
Returns:
Pointer to the result of evaluating e in rho.
SEXP Rf_findFun ( SEXP  symbol,
SEXP  rho 
)
void Rf_findFunctionForBody ( SEXP  body)
SEXP Rf_findVar ( SEXP  symbol,
SEXP  rho 
)

Find the binding of a symbol in an environment and its enclosing environments.

This function calls Rf_findVarInFrame3 on the given frame and its enclosing environments, until a binding is found or the empty environment is reached.

Parameters:
symbolthe SYMSXP that should be looked up
rhoan ENVSXP that is the starting point for the lookup
Returns:
Returns the binding value, or R_UnboundValue if none was found.
Can cause GC:
if one of the environments is of class "UserDefinedDatabase" or active bindings (R_MakeActiveBinding) are used.
SEXP Rf_findVarInFrame ( SEXP  rho,
SEXP  symbol 
)
SEXP Rf_findVarInFrame3 ( SEXP  rho,
SEXP  symbol,
Rboolean  doGet 
)

Find the binding for a symbol in a single environment.

The lookup will query user defined databases if the environment is of class "UserDefinedDatabase" (using R_ObjectTable), and query active binding (R_MakeActiveBinding).

Parameters:
rhoan ENVSXP in which the lookup will take place
symbolthe SYMSXP that should be looked up
doGetspecifies if the lookup is done to get the value (TRUE), as opposed to only determining whether there is a binding. The only effect is that, if this is FALSE, R_ObjectTable::exists is called before calling R_ObjectTable::get.
Returns:
Returns the binding value, or R_UnboundValue if none was found.
Can cause GC:
if the environments is of class "UserDefinedDatabase" or active bindings (R_MakeActiveBinding) are used.
SEXP Rf_getAttrib ( SEXP  vec,
SEXP  name 
)

Access a named attribute.

Parameters:
vecPointer to the R value whose attributes are to be accessed.
nameEither a pointer to the symbol representing the required attribute, or a pointer to a character vector containing the required symbol name as the first element; in the latter case, as a side effect, the corresponding symbol is installed if necessary.
Returns:
Pointer to the requested attribute, or R_NilValue if there is no such attribute.
Note:
The above documentation is incomplete: refer to the source code for further details.
SEXP Rf_GetColNames ( SEXP  dimnames)
void Rf_GetMatrixDimnames ( SEXP  x,
SEXP rl,
SEXP cl,
const char **  rn,
const char **  cn 
)
SEXP Rf_GetOption ( SEXP  tag,
SEXP  rho 
)
int Rf_GetOptionDigits ( void  )
int Rf_GetOptionWidth ( void  )
SEXP Rf_GetRowNames ( SEXP  dimnames)
void Rf_gsetVar ( SEXP  symbol,
SEXP  value,
SEXP  rho 
)
Rboolean Rf_inherits ( SEXP  ,
const char *   
)
SEXP Rf_install ( const char *  name)

Get a pointer to a regular Symbol object.

If no Symbol with the specified name currently exists, one will be created, and a pointer to it returned. Otherwise a pointer to the existing Symbol will be returned.

Parameters:
nameThe name of the required Symbol (CE_NATIVE encoding is assumed).
Returns:
Pointer to a Symbol (preexisting or newly created) with the required name.
SEXP Rf_installChar ( SEXP  charSXP)
SEXP Rf_installDDVAL ( int  i)
SEXP Rf_installS3Signature ( const char *  ,
const char *   
)
int Rf_isBasicClass ( const char *  ss)
Parameters:
sPointer to an R value.
Returns:
TRUE iff the R value pointed to by s is a complex vector.

Is this an environment?

Parameters:
sPointer to a R value.
Returns:
TRUE iff the value pointed to by s is an environment.
Parameters:
sPointer to an R value.
Returns:
TRUE iff the R value pointed to by s is an expression.
Parameters:
sPointer to an R value.
Returns:
TRUE iff the R value pointed to by s is a logical vector.

Is this the null value?

Parameters:
sPointer to an R value.
Returns:
TRUE iff the R value pointed to by s is either R_NilValue or has SEXPTYPE NILSXP.

Does an object have a class attribute?

Parameters:
sPointer to an R value.
Returns:
TRUE iff the object pointed to by s has a class attribute.
Parameters:
sPointer to an R value.
Returns:
TRUE iff the R value pointed to by s is a real vector.
Parameters:
sPointer to an R value.
Returns:
TRUE iff the R value pointed to by s is a vector of strings.

Test if an R value is a symbol.

Parameters:
sPointer to an R value.
Returns:
TRUE iff s points to an R value with SEXPTYPE SYMSXP.
Rboolean Rf_isUnsorted ( SEXP  x,
Rboolean  strictly 
)

Is an R value a vector?

Vector in this context embraces R matrices and arrays.

Parameters:
sPointer to the R value to be tested. The value may be R_NilValue, in which case the function returns FALSE.
Returns:
TRUE iff s points to a vector object.
SEXP Rf_lang2 ( SEXP  ,
SEXP   
)
SEXP Rf_lang3 ( SEXP  ,
SEXP  ,
SEXP   
)
SEXP Rf_lang4 ( SEXP  ,
SEXP  ,
SEXP  ,
SEXP   
)
SEXP Rf_lang5 ( SEXP  ,
SEXP  ,
SEXP  ,
SEXP  ,
SEXP   
)
SEXP Rf_lang6 ( SEXP  ,
SEXP  ,
SEXP  ,
SEXP  ,
SEXP  ,
SEXP   
)
SEXP Rf_lcons ( SEXP  ,
SEXP   
)

Create an Expression with a specified car and tail.

This function protects its arguments from the garbage collector.

Parameters:
crPointer to the 'car' of the element to be created.
tlPointer to the 'tail' of the element to be created, which must be a pairlist or R_NilValue.
Returns:
Pointer to the constructed list.
SEXP Rf_lengthgets ( SEXP  x,
R_len_t  len 
)
SEXP Rf_list2 ( SEXP  ,
SEXP   
)
SEXP Rf_list3 ( SEXP  ,
SEXP  ,
SEXP   
)
SEXP Rf_list4 ( SEXP  ,
SEXP  ,
SEXP  ,
SEXP   
)
SEXP Rf_list5 ( SEXP  ,
SEXP  ,
SEXP  ,
SEXP  ,
SEXP   
)
SEXP Rf_list6 ( SEXP  ,
SEXP  ,
SEXP  ,
SEXP  ,
SEXP  ,
SEXP   
)
SEXP Rf_listAppend ( SEXP  ,
SEXP   
)
SEXP Rf_match ( SEXP  itable,
SEXP  ix,
int  nmatch 
)
SEXP Rf_matchE ( SEXP  itable,
SEXP  ix,
int  nmatch,
SEXP  env 
)
SEXP Rf_mkChar ( const char *  name)

Get a pointer to a CHARSXP object.

CE_NATIVE encoding is assumed. If no CHARSXP with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing CHARSXP will be returned.

Parameters:
strThe null-terminated text of the required string.
Returns:
Pointer to a string object representing the specified text.
SEXP Rf_mkCharCE ( const char *  name,
cetype_t  enc 
)

Get a pointer to a CHARSXP object.

If no CHARSXP with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing CHARSXP will be returned.

Parameters:
strThe null-terminated text of the required cached string.
encodingThe encoding of the required String. Only CE_NATIVE, CE_UTF8 or CE_LATIN1 are permitted in this context.
Returns:
Pointer to a string object representing the specified text in the specified encoding.
SEXP Rf_mkCharLen ( const char *  name,
int  len 
)

Create a CHARSXP object for specified text.

CE_NATIVE encoding is assumed. If no CHARSXP with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing CHARSXP will be returned.

Parameters:
textThe text of the string to be created, possibly including embedded null characters. The encoding is assumed to be CE_NATIVE.
lengthThe length of the string pointed to by text. Must be nonnegative. The created string will comprise the text plus an appended null byte.
Returns:
Pointer to the created string.
SEXP Rf_mkCharLenCE ( const char *  name,
int  len,
cetype_t  enc 
)

Create a CHARSXP object for specified text and encoding.

If no CHARSXP with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing CHARSXP will be returned.

Parameters:
textThe text of the string to be created, possibly including embedded null characters. The encoding is assumed to be CE_NATIVE.
lengthThe length of the string pointed to by text. Must be nonnegative. The created string will comprise the text plus an appended null byte.
encodingThe encoding of the required String. Only CE_NATIVE, CE_UTF8 or CE_LATIN1 are permitted in this context.
Returns:
Pointer to the created string.
SEXP Rf_mkNamed ( SEXPTYPE  ,
const char **   
)
SEXP Rf_mkString ( const char *  )
SEXP Rf_namesgets ( SEXP  vec,
SEXP  val 
)
int Rf_ncols ( SEXP  s)
int Rf_nlevels ( SEXP  )
int Rf_nrows ( SEXP  s)
SEXP Rf_nthcdr ( SEXP  s,
int  n 
)
Rboolean Rf_pmatch ( SEXP  formal,
SEXP  tag,
Rboolean  exact 
)
void Rf_PrintValue ( SEXP  s)
Rboolean Rf_psmatch ( const char *  f,
const char *  t,
Rboolean  exact 
)
void Rf_readS3VarsFromFrame ( SEXP  ,
SEXP ,
SEXP ,
SEXP ,
SEXP ,
SEXP ,
SEXP  
)
const char* Rf_reEnc ( const char *  x,
cetype_t  ce_in,
cetype_t  ce_out,
int  subst 
)
SEXP Rf_S3Class ( SEXP  obj)
SEXP Rf_ScalarReal ( double  )
SEXP Rf_setAttrib ( SEXP  vec,
SEXP  name,
SEXP  val 
)

Set or remove a named attribute.

Parameters:
vecPointer to the value whose attributes are to be modified.
nameEither a pointer to the symbol representing the required attribute, or a pointer to a character vector containing the required symbol name as the first element; in the latter case, as a side effect, the corresponding symbol is installed if necessary.
valEither the value to which the attribute is to be set, or R_NilValue. In the latter case the attribute (if present) is removed.
Returns:
Refer to source code. (Sometimes vec, sometimes val, sometime R_NilValue ...)
Note:
The above documentation is probably incomplete: refer to the source code for further details.
void Rf_setSVector ( SEXP vec,
int  len,
SEXP  val 
)
void Rf_setVar ( SEXP  symbol,
SEXP  value,
SEXP  rho 
)
SEXPTYPE Rf_str2type ( const char *  s)
int Rf_stringPositionTr ( SEXP  ,
const char *   
)
SEXP Rf_stringSuffix ( SEXP  string,
int  fromIndex 
)
SEXP Rf_substitute ( SEXP  lang,
SEXP  rho 
)
const char* Rf_translateChar ( SEXP  x)
const char* Rf_translateChar0 ( SEXP  x)
const char* Rf_translateCharUTF8 ( SEXP  x)

Convert contents of a CHARSXP to UTF8.

Parameters:
xPointer to a CHARSXP.
Returns:
The text of x rendered in UTF8 encoding.
Note:
The result is held in memory allocated using R_alloc(). The calling code must arrange for this memory to be released in due course.
const char* Rf_type2char ( SEXPTYPE  t)

Name of type within R.

Translate a SEXPTYPE to the name by which it is known within R.

Parameters:
stThe SEXPTYPE whose name is required.
Returns:
The SEXPTYPE's name within R.
void Rf_unprotect ( int  )
void Rf_unprotect_ptr ( SEXP  s)

Remove entry from pointer protection stack.

Removes from the C pointer protection stack the uppermost stack cell containing a pointer to a specified node, and drops all the stack cells above it by one place.

Parameters:
nodePointer to the node whose cell is to be removed from the C pointer protection stack.
void Rf_warningcall ( SEXP  call,
const char *  format,
  ... 
)
void Rf_warningcall_immediate ( SEXP  call,
const char *  format,
  ... 
)
SEXP Rf_xlengthgets ( SEXP  x,
R_xlen_t  len 
)
int() RSTEP ( SEXP  x)
int() RTRACE ( SEXP  x)

Get function tracing status.

Parameters:
xPointer to a function, or R_NilValue.
Returns:
Refer to 'R Internals' document. Returns 0 if x is R_NilValue.
void SET_ATTRIB ( SEXP  x,
SEXP  v 
)

Replace an object's attributes.

Parameters:
xPointer to an R value.
vPointer to a pairlist giving the new attributes of x or R_NilValue. x should be considered to assume ownership of the 'car' values in v ; they should therefore not be subsequently altered externally.
void SET_BODY ( SEXP  x,
SEXP  v 
)
void SET_CLOENV ( SEXP  x,
SEXP  v 
)

Replace the environment of a closure.

Parameters:
xPointer to a closure object.
vPointer to the environment now to be considered as the environment of this closure. R_NilValue is not permissible.
void() SET_DDVAL ( SEXP  x,
int  v 
)
void SET_ENCLOS ( SEXP  x,
SEXP  v 
)
void() SET_ENVFLAGS ( SEXP  x,
int  v 
)
void SET_FORMALS ( SEXP  x,
SEXP  v 
)
void SET_FRAME ( SEXP  x,
SEXP  v 
)
void() SET_HASHASH ( SEXP  x,
int  v 
)
void SET_HASHTAB ( SEXP  x,
SEXP  v 
)
void() SET_HASHVALUE ( SEXP  x,
int  v 
)
void SET_INTERNAL ( SEXP  x,
SEXP  v 
)

Associate a Symbol with a .Internal() function.

Parameters:
xPointer to a symbol.
vPointer to the builtin function to be associated by this symbol. R_NilValue is permissible, and signifies that any previous association of sym with a function is to be removed from the table.
void() SET_MISSING ( SEXP  x,
int  v 
)
void() SET_NAMED ( SEXP  x,
int  v 
)

Set object copying status.

Parameters:
xPointer to R value. The function does nothing if x is R_NilValue.
vRefer to 'R Internals' document.
void() SET_OBJECT ( SEXP  x,
int  v 
)
void SET_PRCODE ( SEXP  x,
SEXP  v 
)
void SET_PRENV ( SEXP  x,
SEXP  v 
)
void SET_PRINTNAME ( SEXP  x,
SEXP  v 
)
void SET_PRSEEN ( SEXP  x,
int  v 
)
void SET_PRVALUE ( SEXP  x,
SEXP  v 
)

Set the value of a promise.

Once the value is set to something other than R_UnboundValue, the environment pointer is set to R_NilValue.

Parameters:
xPointer to a promise.
vPointer to the value to be assigned to the promise.
Todo:
Replace this with a method call to evaluate the promise.
void() SET_RDEBUG ( SEXP  x,
int  v 
)

Set the debugging state of a closure object.

Parameters:
xPointer to a closure object.
vThe new debugging state.
void() SET_RSTEP ( SEXP  x,
int  v 
)
void() SET_RTRACE ( SEXP  x,
int  v 
)

Set function tracing status.

Parameters:
xPointer to a function, or R_NilValue.
vThe desired tracing status: non-zero if tracing is required.
void() SET_S4_OBJECT ( SEXP  x)
void SET_STRING_ELT ( SEXP  x,
R_xlen_t  i,
SEXP  v 
)

Set element of character vector.

Parameters:
xPointer to a character vector .
iIndex of the required element. There is no bounds checking.
vPointer to CHARSXP representing the new value.
void SET_SYMVALUE ( SEXP  x,
SEXP  v 
)

Set symbol's value in the base environment.

Parameters:
xPointer to a symbol.
valPointer to the R value now to be considered as the value of this symbol. R_NilValue or R_UnboundValue are permissible values of val.
Todo:
No binding to R_UnboundValue ought to be created.
void SET_TAG ( SEXP  x,
SEXP  y 
)

Set the tag of a pairlist element.

Parameters:
xPointer to a pairlist element.
yPointer to an R value representing the new tag of the pairlist element.
void() SET_TRUELENGTH ( SEXP  x,
int  v 
)

Set 'true length' of vector.

Parameters:
xPointer to a vector object.
vThe required new 'true length'.
void() SET_TYPEOF ( SEXP  x,
int  v 
)
SEXP SET_VECTOR_ELT ( SEXP  x,
R_xlen_t  i,
SEXP  v 
)

Set element of list.

Parameters:
xPointer to a list.
iIndex of the required element.
vPointer to R value representing the new value.
Returns:
The new value v.
SEXP SETCAD4R ( SEXP  e,
SEXP  y 
)

Set the 'car' value of the fifth element of list.

Parameters:
xPointer to a pairlist element with at least four successors.
yPointer to an R value representing the new value of the fifth element of the list.
Returns:
y.
SEXP SETCADDDR ( SEXP  x,
SEXP  y 
)

Set the 'car' value of the fourth element of list.

Parameters:
xPointer to a pairlist element with at least three successors.
yPointer to an R value representing the new value of the fourth element of the list.
Returns:
y.
SEXP SETCADDR ( SEXP  x,
SEXP  y 
)

Set the 'car' value of the third element of list.

Parameters:
xPointer to a pairlist element with at least two successors.
yPointer to an R value representing the new value of the third element of the list.
Returns:
y.
SEXP SETCADR ( SEXP  x,
SEXP  y 
)

Set the 'car' value of the second element of list.

Parameters:
xPointer to a pairlist element with at least one successor
yPointer to an R value representing the new value of the second element of the list.
Returns:
y.
SEXP SETCAR ( SEXP  x,
SEXP  y 
)

Set the 'car' value of a pairlist element.

Parameters:
xPointer to a pairlist element.
yPointer to an R value representing the new value of the list car.
Returns:
y.
SEXP SETCDR ( SEXP  x,
SEXP  y 
)

Replace the tail of a pairlist element.

Parameters:
xPointer to a pairlist element.
yPointer to an R value representing the new tail of the list.
Returns:
y.
void() SETLENGTH ( SEXP  x,
int  v 
)

Set length of vector.

Parameters:
xPointer to a vector object.
vThe required new length, which must not be greater than the original length of the vector.
int() SETLEVELS ( SEXP  x,
int  v 
)
void SHALLOW_DUPLICATE_ATTRIB ( SEXP  to,
SEXP  from 
)
SEXP() STRING_ELT ( SEXP  x,
R_xlen_t  i 
)

Examine element of a character vector.

Parameters:
xPointer to a character vector.
iIndex of the required element. There is no bounds checking.
Returns:
Pointer to extracted i 'th element.
SEXP*() STRING_PTR ( SEXP  x)
SEXP() SYMVALUE ( SEXP  x)

Symbol's value in the base environment.

Parameters:
xPointer to a symbol.
Returns:
Pointer to an R value representings x's value. Returns R_UnboundValue if no value is currently associated with the Symbol.
SEXP() TAG ( SEXP  e)

Get tag of pairlist element.

Parameters:
ePointer to a pairlist element, or R_NilValue.
Returns:
Pointer to the tag of the list element, or 0 if e is R_NilValue.
int() TRUELENGTH ( SEXP  x)
int() TYPEOF ( SEXP  x)

Get object's SEXPTYPE.

Parameters:
xPointer to R value.
Returns:
SEXPTYPE of x .
void() UNSET_S4_OBJECT ( SEXP  x)
SEXP() VECTOR_ELT ( SEXP  x,
R_xlen_t  i 
)

Examine element of a list.

Parameters:
xPointer to a list.
iIndex of the required element. There is no bounds checking.
Returns:
The value of the i 'th element.
R_xlen_t() XLENGTH ( SEXP  x)
Parameters:
xPointer to a vector object.
Returns:
The length of x, or 0 if x is R_NilValue. (In the case of certain hash tables, this means the 'capacity' of x , not all of which may be used.)
Parameters:
xPointer to a vector object.
Returns:
The 'true length' of x. According to the R Internals document for R 2.4.1, this is only used for certain hash tables, and signifies the number of used slots in the table.

Variable Documentation

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines