Reputation: 47350
I need a list of all functions of a package including the unexported ones, I had no luck with ls
:
"aggregate.data.frame" %in% ls("package:stats",all.names=TRUE) # TRUE
"aggregate.formula" %in% ls("package:stats",all.names=TRUE) # FALSE
typeof(stats:::aggregate.formula) # [1] "closure"
How can I get a list containing 'aggregate.formula'
?
Upvotes: 1
Views: 218
Reputation: 887901
We can use getNamespace
in ls
to return all the unexported functions
"aggregate.formula" %in% ls(getNamespace("stats"), all.names = TRUE)
#[1] TRUE
Upvotes: 4