attach_pkgs: Fully attach or load packages for making model predictions
Description
These are developer-facing functions, useful for supporting new model types.
Some models require one or more R packages to be fully attached to make
predictions, and some require only that the namespace of one or more R
packages is loaded.
Usage
attach_pkgs(pkgs)
load_pkgs(pkgs)
Value
An invisible TRUE.
Arguments
pkgs
A character vector of package names to load or fully attach.
Details
These two functions will attempt either to:
fully attach or
load
the namespace of the pkgs vector of package names, preserving the current
random seed.
To learn more about load vs. attach, read the "Dependencies" chapter of R Packages.
For deploying a model, it is likely safer to fully attach needed packages
but that comes with the risk of naming conflicts between packages.