ls_grep: List objects in global environment matching a regex pattern

View source: R/ls_grep.R

ls_grepR Documentation

List objects in global environment matching a regex pattern

Description

Determine the names of all objects in the global environment that match a specified regex pattern.

Usage

ls_grep(pattern, value = TRUE, envir = .GlobalEnv, ...)

Arguments

pattern

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

value

logical, whether to return the names of the objects. If set to FALSE, the position of the objects in the global environment object listing is returned. Defaults to TRUE.

envir

the environment in which to search. Defaults to the global environment, .GlobalEnv.

...

optional arguments passed to grep.

Value

a vector of character names or numeric positions for the matches.


mjdufort/miscHelpers documentation built on July 29, 2024, 6:14 p.m.