Skip to contents

A function to remove all attached objects from the search path with any exceptions specified

Usage

rm_envir(
  ignore = c(".GlobalEnv", "package:", "tools:", "Autoloads"),
  verbose = options()$verbose,
  perl = FALSE
)

Arguments

ignore

a character vector of regular expression search terms within the output from search() as to which should be retained.

verbose

logical to print information on changes to the global environment or external files. Defaults to options()$verbose.

perl

logical. Should Perl-compatible regexps be used?

Details

it detaches anything not ignored. It is called by default within attach_pop .

See also