Skip to contents

Individual session check functions that each inspect one way in which an R session could be considered not to be "clean". Session checkers can produce errors, warnings, or messages if requested.

Usage

sessioncheck(action = NULL, checks = NULL, ...)

Arguments

action

Behaviour to take if the status is not clean. Possible values are "error", "warn", "message", and "none". If the user does not specify an action the default to set action = "warn".

checks

Character vector listing the checks to run. If the user does not specify the checks, the default is to run checks = c("globalenv_objects", "attached_packages", "attached_environments").

...

Arguments passed to individual checks.

Value

Invisibly returns an object of class sessioncheck_sessioncheck.

Details

sessioncheck() allows the user to apply multiple session checks in a single function. The following arguments are recognised via ...:

Other arguments are ignored.

Examples

sessioncheck(action = "message")
#> Session check results:
#> - Objects in global environment: [no issues]
#> - Attached packages: sessioncheck
#> - Attached environments: [no issues]