rm_grep: Remove objects matching a regex pattern from global...

View source: R/rm_grep.R

rm_grepR Documentation

Remove objects matching a regex pattern from global environment

Description

Identify and remove all objects in the global environment that match a specified regex pattern. By default, the user is prompted with a list of the objects before they are removed.

Usage

rm_grep(rm_pattern, ask = TRUE, envir = .GlobalEnv, ...)

Arguments

rm_pattern

character string, the regex pattern to match. Passed to grep.

ask

logical, whether to prompt the user before removing objects. Defaults to TRUE.

envir

the name of the environment in which to make the changes. Defaults to the global environment, .GlobalEnv.

...

optional arguments passed to grep.


mjdufort/miscHelpers documentation built on Feb. 4, 2024, 7:44 p.m.