prep {kim} | R Documentation |
Prepare package(s) for use
Description
Installs, loads, and attaches package(s). If package(s) are not installed, installs them prior to loading and attaching.
Usage
prep(
...,
pkg_names_as_object = FALSE,
silent_if_successful = FALSE,
silent_load_pkgs = NULL
)
Arguments
... |
names of packages to load and attach, separated by commas,
e.g., |
pkg_names_as_object |
logical. If |
silent_if_successful |
logical. If |
silent_load_pkgs |
a character vector indicating names of
packages to load silently (i.e., suppress messages that get printed
when loading the packaged). By default, |
Value
there will be no output from this function. Rather, packages given as inputs to the function will be installed, loaded, and attached.
Examples
prep(data.table)
prep("data.table", silent_if_successful = TRUE)
prep("base", utils, ggplot2, "data.table")
pkgs <- c("ggplot2", "data.table")
prep(pkgs, pkg_names_as_object = TRUE)
prep("data.table", silent_load_pkgs = "data.table")