Closed HenrikBengtsson closed 9 years ago
I'm pretty sure the "defunct" error is thrown when getKnownSubclasses()
tests whether the object is a function and of class Class
or not, i.e.
# Keep only functions that are Class objects
keep <- sapply(objectNames, FUN=function(objectName) {
expr <- substitute({
is.function(x) && inherits(x, "Class")
}, list(x=as.name(objectName)));
eval(expr, envir=envir);
});
It's possible that this test has to be done using tryCatch()
or similar.
For the record, see also R-devel thread 'Inspect a "delayed" assigned whose value throws an error?' started on 2015-01-26.
The
hgu133a.db::hgu133aPFAM
object is interesting, because it is an anonymous function that is evaluated when retrieved, e.g.