A wrapper for library() that can load multiple packages at once. If the
package is not installed, the function will install it first.
Usage
load_packages(pkgs, install_missing = TRUE)
Arguments
- pkgs
A character vector of package names
- install_missing
A boolean indicating whether to install missing
packages. Default is TRUE
Value
Invisibly, a character vector of the packages that were loaded
Examples
if (FALSE) { # \dontrun{
load_packages(c("dplyr", "ggplot2"))
} # }