[Rd] level of mutability for the type of a SEXP
lgautier at gmail.com
Tue Feb 19 13:40:14 CET 2008
I am writing C code to interface with R, and I would like to know the
level of mutability for the type of a SEXP.
I see that there is a macro/function TYPEOF(), and that it can be used
as an l-value, as well as a macro/function SET_TYPEOF().
My question is "should the type be considered immutable, or it can it
change after the SEXP has been created and used for a while ?".
I understand that a call to TYPEOF will not perform any conversion,
and my question is only about being sure that once the type of a given
SEXP is set it cannot change.
More information about the R-devel