inheritedSlotNames {methods} | R Documentation |
For a class (or class definition, see getClass
and
the description of class classRepresentation
),
give the names which are inherited from “above”, i.e., super
classes, rather than by this class' definition itself.
inheritedSlotNames(Class, where = topenv(parent.frame()))
Class |
character string or
|
where |
environment, to be passed further to
|
character vector of slot names, or NULL
.
slotNames
, slot
, setClass
, etc.
.srch <- search()
library(stats4)
inheritedSlotNames("mle")
## Not run:
if(require("Matrix")) {
print( inheritedSlotNames("Matrix") ) # NULL
## whereas
print( inheritedSlotNames("sparseMatrix") ) # --> Dim & Dimnames
## i.e. inherited from "Matrix" class
print( cl <- getClass("dgCMatrix") ) # six slots, etc
print( inheritedSlotNames(cl) ) # *all* six slots are inherited
}
## detach package we've attached above:
for(n in rev(which(is.na(match(search(), .srch)))))
try( detach(pos = n) )
## End(Not run)