grepdf: Grep for column names from a 'data.frame'

View source: R/grepdf.R

grepdfR Documentation

Grep for column names from a data.frame

Description

Grep for column names from a data.frame

Usage

grepdf(
  pattern,
  x,
  ...,
  ignore.case = FALSE,
  perl = FALSE,
  value = FALSE,
  fixed = FALSE,
  useBytes = FALSE,
  invert = FALSE
)

Arguments

pattern

passed to grep

x

data.frame to work with

...

force later arguments to be passed by name

ignore.case

passed to grep

perl

passed to grep

value

passed to grep

fixed

passed to grep

useBytes

passed to grep

invert

passed to grep

Value

column names of x matching grep condition.

See Also

grep, grepv

Examples



d <- data.frame(xa=1, yb=2)

# starts with
grepdf('^x', d)

# ends with
grepdf('b$', d)


wrapr documentation built on Aug. 20, 2023, 1:08 a.m.