grepr | R Documentation |
This is a wrapper for grep
to return not only the indexes
of the hits (optional), but the hits themselves. (This is mainly a helper function
for find_var
but can at times be useful.)
grepr(pattern, x, index = FALSE, ...)
pattern |
pattern to look for |
x |
character string to inspect |
index |
logical; whether to also return indexes of hits (defaul FALSE) |
... |
arguments to be passed to |
grep
, grepl
grepr(pattern="a", x=names(datasets::mtcars))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.