It usually takes some time to load an R package.
R> system.time(library(ggplot2))
user system elapsed
0.686 0.084 0.980
R> system.time(ggplot2::qplot) # run in a different R session
user system elapsed
0.612 0.088 0.906
If I just want to use a few functions in a package, it would be better to reduce the package load time. For example, if I just want to use qplot()
and ggsave()
, is there a way to speed up the package load time of ggplot2
?
More generally, is there a standard method to reduce the pacakge load time for any package. Thanks.