Typedef struct Requires USE_RINTERNALS

S-expression (SEXP) record (REC) structure, a C structure underlying every R object. Accessible via a pointer of type SEXP. SEXPREC is a variant type, with subtypes for all R’s data structures (see SEXPTYPE for a list of subtypes).

The SEXPREC is composed of two parts (five struct members in total):

  • Header, SEXPREC_HEADER:

    • struct sxpinfo_struct sxpinfo

    • struct SEXPREC *attrib

    • struct SEXPREC *gengc_next_node

    • struct SEXPREC *gengc_prev_node

  • Node data, u.

Declaration

typedef struct SEXPREC {
    SEXPREC_HEADER;
    union {
  struct primsxp_struct primsxp;
  struct symsxp_struct symsxp;
  struct listsxp_struct listsxp;
  struct envsxp_struct envsxp;
  struct closxp_struct closxp;
  struct promsxp_struct promsxp;
    } u;
} SEXPREC;

In Rinternals.h.

References

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

See also