Skip to main content

set_attrib

Function set_attrib 

Source
pub unsafe fn set_attrib(x: SEXP, attributes: SEXP)
Expand description

Replace all attributes of x with the pairlist attributes

On R >= 4.5, where SET_ATTRIB is no longer part of the API, this clears the attributes with CLEAR_ATTRIB and sets each one with Rf_setAttrib.

ยงSafety

This function dereferences raw SEXP pointers. The caller must ensure that x is a valid SEXP pointer and that attributes is a valid pairlist or R_NilValue, and that both are protected.