Attaches packages that are already installed. Names that are not found on
the library search path are reported with suggested
install.packages() or remotes::install_github() calls to run yourself;
this function does not install packages (CRAN policy).
ipak(pkg_list, force_cran = FALSE, force_github = FALSE)A character vector of package names. GitHub sources use
"user/repo"; the installed package name is the repository name (see
basename()).
Logical. Ignored (retained for backwards compatibility; this function does not install or update packages).
Logical. Ignored (retained for backwards compatibility).
A data.frame with columns pkg_name (character), success
(logical: whether require() attached the package), and version
(character, NA when not loaded). Returned invisibly; summaries are
printed via print() on subsets when rows exist.
ipak() was first developed by
Steven Worthington and made
publicly available
here. This version
only loads packages and suggests install commands for missing ones.
# \donttest{
pkg_list <- c("utils", "stats") # base packages — usually present
ipak(pkg_list)
#> ℹ Successfully loaded:
#> pkg_name version
#> utils 4.5.3
#> stats 4.5.3
# }