Grep for column names from a data.frame
grepdf(
pattern,
x,
...,
ignore.case = FALSE,
perl = FALSE,
value = FALSE,
fixed = FALSE,
useBytes = FALSE,
invert = FALSE
)
column names of x matching grep condition.
d <- data.frame(xa=1, yb=2)
# starts with
grepdf('^x', d)
#> [1] "xa"
# ends with
grepdf('b$', d)
#> [1] "yb"