Skip to contents

Load specific packages, print a list of the loaded packages along with versions. Only include libraries, don't install if library doesn't exist

Usage

libraryAll(..., lib.loc = NULL, quietly = FALSE, clear = TRUE)

Arguments

...

multiple library names

lib.loc

OPTIONAL. library store location

quietly

OPTIONAL. attach library quietly

clear

OPTIONAL. clear environment after attach

Value

loaded libraries and clear environment

Examples

# \donttest{
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
# }