grepr: Look for a pattern in a character vector and return the hits

Description Usage Arguments Author(s) See Also Examples

View source: R/grepr.r

Description

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.)

Usage

1
grepr(pattern, x, index = FALSE, ...)

Arguments

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

Author(s)

Henrik Renlund

See Also

grep, grepl

Examples

1

renlund/dataman documentation built on May 27, 2019, 5:51 a.m.