pub unsafe fn s4_get_slot(obj: SEXP, slot_name: &str) -> Result<SEXP, String>Expand description
Get the value of a named slot from an S4 object.
Uses R’s slot(obj, name) to access the slot value.
§Safety
objmust be a valid S4 SEXP with the named slot.- Must be called from the R main thread.
§Returns
Ok(SEXP)with the slot value (unprotected).Err(String)if the slot doesn’t exist or another R error occurs.