p_loaded(..., all = FALSE, char, character.only = FALSE)p_isloaded(...)
TRUE
will show all packages
including base install; FALSE
will show all packages
excluding base install packages that install when R loads.p_loaded
from within a function (or just having difficulties calling it
using a character vector input) then pass your character vector of packages
to load to this parameter directly.TRUE
then p_loaded
will only
accept a single input which is a character vector containing the names of
packages to load.p_loaded
- Output is a character string of loaded packages.
p_isloaded
- Check if package(s) is loaded.
## <strong>Not run</strong>: # p_load(lattice, ggplot2)## <strong>End(Not run)</strong> p_loaded()[1] "pacman" "staticdocs" "highlight" "devtools" "qdap" "RColorBrewer" [7] "qdapTools" "qdapRegex" "qdapDictionaries" "ggplot2"p_loaded(all=TRUE)[1] "pacman" "staticdocs" "highlight" "devtools" "qdap" "RColorBrewer" [7] "qdapTools" "qdapRegex" "qdapDictionaries" "ggplot2" "stats" "graphics" [13] "grDevices" "utils" "datasets" "methods" "base"p_loaded(ggplot2, tm, qdap)ggplot2 tm qdap TRUE FALSE TRUEp_isloaded(ggplot2)ggplot2 TRUEp_isloaded(ggplot2, dfs, pacman)ggplot2 dfs pacman TRUE FALSE TRUE## <strong>Not run</strong>: p_unload(lattice)