This helper function extracts requested slots from the S4 class object.
It is a simple wrapper of methods::slot() function.
Arguments
- object
(
S4)
an object from a formally defined S4 class.- names
(
character)
a vector with names of slots to be fetched. This function assumes that for every element innames, there exists a slot of the same name in theobject.- simplify
(
flag)
should an output be simplified? This has an effect if and only if a single slot is about to be extracted, i.e.namesis just a single string.
