Expand description
S4 slot access and class checking helpers.
For new packages, S7 is the
recommended class system (use #[miniextendr(s7)]). These S4 helpers
exist for interoperating with existing S4 packages — for example,
reading slots from Bioconductor objects passed as function arguments.
Since R’s C API for S4 slot access (R_has_slot, R_do_slot,
R_do_slot_assign) is not exposed in miniextendr’s FFI bindings,
these helpers use R expression evaluation via RCall
as a fallback.
All functions require being called from the R main thread and operate
Functions§
- methods_
namespace 🔒 ⚠ - Get the
methodspackage namespace for evaluating S4 functions. - s4_
class_ ⚠name - Extract the S4 class name from an object.
- s4_
get_ ⚠slot - Get the value of a named slot from an S4 object.
- s4_
has_ ⚠slot - Check if an S4 object has a named slot.
- s4_is⚠
- Check if a SEXP is an S4 object.
- s4_
set_ ⚠slot - Set the value of a named slot on an S4 object.
- scalar_
string 🔒 - Create a scalar R character string from a Rust
&str.