Skip to contents

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_objects(action = "warn", allow_globalenv_objects = NULL)

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_globalenv_objects

Character vector containing names of objects that are "allowed", and will not trigger an action.

Value

Invisibly returns an object of class sessioncheck_status.

Details

This checker inspects the state of the global environment and takes action based on the objects found there. When allow_globalenv_objects = 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.

Examples

check_globalenv_objects(action = "message")