Load specific packages, print a list of the loaded packages along with versions. Only include libraries, don't install if library doesn't exist
Arguments
- ...
multiple library names
- lib.loc
OPTIONAL. library store location
- quietly
OPTIONAL. attach library quietly
- clear
OPTIONAL. clear environment after attach
- clearPkgs
Clear previous loaded packages, TRUE or FALSE
Examples
# \donttest{
# load packages and print their versions to the console
libraryAll(base) #one package
#>
#> Packages Loaded:
#> base, version 4.0.2
libraryAll(
base,
tools,
stats
) #multiple packages
#>
#> Packages Loaded:
#> base, version 4.0.2
#> tools, version 4.0.2
#> stats, version 4.0.2
libraryAll("grDevices") #with quotes
#>
#> Packages Loaded:
#> grDevices, version 4.0.2
libraryAll(
stats,
utils,
quietly = TRUE
) #load quietly
#>
#> Packages Loaded:
#> stats, version 4.0.2
#> utils, version 4.0.2
libraryAll(
base,
clear = FALSE) #do not clear console after load
# clear previously loaded packages, then load r2resize and r2social
libraryAll(
stats,
utils,
clearPkgs = TRUE
)
#>
#> Packages Loaded:
#> stats, version 4.0.2
#> utils, version 4.0.2
# }