Individual session check functions that examine attached packages and loaded namespaces. Session checkers can produce errors, warnings, or messages if requested.
Arguments
- action
Behaviour to take if the status is not clean. Possible values are "error", "warn", "message", and "none". The default is
action = "warn"
.- allow
Character vector containing names of packages that are "allowed", and will not trigger an action. Base priority packages are always allowed and will never trigger actions (see details).
Value
Invisibly returns a status flag vector, a logical vector with names referring
to a detected package. Values are TRUE
if the package triggers an action, FALSE
if it does not.
Details
The default behaviour of the allow
argument is slightly for each checker:
check_packages()
: This checker inspects the list of packages that have been attached to the search path (e.g., vialibrary()
). Regardless of the value ofallow
, R packages that have "base" priority (e.g., base, utils, and grDevices) do not trigger an action. Whenallow = NULL
these are the only packages that will not trigger actions.check_namespaces()
: This checker inspects the list of loaded namespaces (packages that have been loaded but not attached). Theallow
argument for this checker is almost identical tocheck_packages()
: the only difference is that the sessioncheck package is always allowed as a loaded namespace, since the package namespace must be loaded in order to call the function itself.