Installs (default if required) and loads specified packages.
requiredPackages(
packages,
installPackages = FALSE,
lib = .libPaths()[1],
repos = "http://cran.us.r-project.org"
)
A list of packages
TRUE/FALSE Install package if not installed
character vector giving the library directories where to install the packages. Recycled as needed. If missing, defaults to the first element of .libPaths()
character vector, the base URL(s) of the repositories to use, e.g., the URL of a CRAN mirror such as "https://cloud.r-project.org". For more details on supported URL schemes see url. Can be NULL to install from local files, directories or URLs: this will be inferred by extension from pkgs if of length one.