Individual session check functions that inspect the contents of the global environment and the names of attached non-package environments. Session checkers can produce errors, warnings, or messages if requested.
Usage
check_globalenv(action = "warn", allow = NULL)
check_attachments(action = "warn", allow = NULL)
Value
Invisibly returns a status flag vector, a logical vector with names
referring to a detected entity (object in the global environment, or a non-package
environment attached to the search path). Values are TRUE
if the entity triggers
an action, FALSE
if it does not.
Details
The default behaviour of the allow
argument is slightly for each checker:
check_globalenv()
: This checker inspects the state of the global environment and takes action based on the objects found there. Whenallow = NULL
, variables in the global environment will not trigger an action if the name starts with a dot. For example,.Random.seed
and.Last.value
do not trigger actions by default.check_attachments()
: This checker inspects all environments on the search path. This includes attached packages, anything added usingattach()
, and the global environment. Whenallow = NULL
, package environents do not trigger an action, nor do "tools:rstudio", "tools:positron", "tools:callr", or "Autoloads". The global environment and the package environment for the base package never trigger actions.