rm_like: Remove variables with names like this

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Remove things in the global environment with name like a string you supply. Like is in the regex match sense, so if you make a slip blowing away most of your environment is a possibility.

Usage

1

Arguments

pattern

a regex pattern to match. Could be a simple prefix or suffix string.

Value

Nothing.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
lm_1 = 1
lm_2 = 2
glm_1 = 3
rm_like("^lm_")

> ls()
[1] "glm_1"

## End(Not run)

MilesMcBain/mmmisc documentation built on Aug. 4, 2020, 10:50 a.m.