Skip to contents

Check if an environment is clean

Usage

check_environment(action = "warn", ignore = NULL, envir = .GlobalEnv)

Arguments

action

Behaviour to take if environment is not clean. Possible values are "error", "warn", "message", and "none".

ignore

Character vector containing names of variables that will not trigger an action. If NULL, variables that start with a dot are ignored.

envir

Environment to be checked.

Value

Invisibly returns a logical vector with names corresponding to object names in the environment. Values are TRUE if the object is ignored, FALSE if not

Examples

check_environment(action = "message")