.srch <- search()
library(stats4)
inheritedSlotNames("mle")
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
}
<!-- % currently, don't do this when running all examples: classes remain -->
<!-- % cached anyway : -->
## detach package we've attached above:
for(n in rev(which(is.na(match(search(), .srch)))))
try( detach(pos = n) )
<!-- % end{dontrun} -->
Run the code above in your browser using DataLab