I've looked at the function installed.packages
and was wondering if there was a way to do something similar for a package. Specifically, how can I best extract certain "functions" from a pacakge. This is probably best explained using the sample code below:
get("Species",as.environment(iris))
The above helps me obtain the Species column from iris. Logically, I thought of something like this:
g<-library(ggplot2)
get("theme_",as.environment(g))
This returns the following error:
Error in as.environment(g) : no item called "forcats" on the search list
How can I best achieve what I'm trying to do? Thanks!