load.unloaded checks the packages provided in libs against a call to search and only makes a call to library for unloaded (and attached) libraries.

load_unloaded(
  ...,
  libs = NULL,
  delim = "[,|; ]",
  autoinstall = FALSE,
  chatty = FALSE
)

Arguments

...

dots_list A vector of packages to load given as characters. Delimited strings are allowed: DO NOT use + or -.

libs

(string[]) A vector of packages to load given as characters or symbols. Delimited strings are allowed: DO NOT use + or -.

delim

(string | ", ") A regular expression delimiter pattern that operates on str: DO NOT use glyphs + or -.

autoinstall
  • FALSE (default): A notification message is provided if chatty is TRUE; otherwise, no message is sent

  • TRUE: If a library isn't installed, it will be using the default library installation path

  • list(): Assumes TRUE and should be a list of arguments (excluding pkgs) to send to install.packages

chatty

(logical | FALSE) Sets the quietly argument in the call to library()

Value

See library

Details

Library names can be declared in a single, delimited string (e.g., "name0 name1, name2|name3") or as a vector of strings (e.g. c("name0", "name1", "name2")). Inclusions and exclusions can be declared using the following template:
"library_name{+name0+name1+...}" for inclusions and "library_name{-name0-name1-...}". Since inclusions and exclusions cannot be used in the same call to library(), trying to do so with this function will result in an error.

See also

Other Chapter 1 - Environment Processing: copy_obj(), refer.to(), save_image()