grepls | R Documentation |
Search for objects in the environment
grepls(
x,
where = "all",
ignore.case = TRUE,
searchNames = TRUE,
verbose = FALSE,
...
)
x |
|
where |
|
ignore.case |
|
searchNames |
|
verbose |
|
... |
additional parameters are ignored. |
This function searches the active R environment for an object name
using vigrep()
(value, case-insensitive grep).
It is helpful when trying to find an object using a
substring, for example grepls("statshits")
.
vector
of matching object names, or if where="all"
a named list,
whose names indicate the search environment name, and whose
entries are matching object names within each environment.
Other jam grep functions:
igrepHas()
,
igrepl()
,
igrep()
,
provigrep()
,
unigrep()
,
unvigrep()
,
vgrep()
,
vigrep()
# Find all objects named "grep", which should find
# base grep() and jamba::vigrep() among other results.
grepls("grep");
# Find objects in the local environment
allStatsHits <- c(1:12);
someStatsHits <- c(1:3);
grepls("statshits");
# shortcut way to search only the .GlobalEnv, the active local environment
grepls("statshits", 1);
# return objects with "raw" in the name
grepls("raw");
# Require "Raw" to be case-sensitive
grepls("Raw", ignore.case=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.