grepict_rigid: helper for grepict

View source: R/grepict.R

grepict_rigidR Documentation

helper for grepict

Description

this is essentially a helper function for grepict, see the documentation

Usage

grepict_rigid(
  pattern,
  x = NULL,
  data,
  ...,
  include = c(TRUE, TRUE),
  long = TRUE,
  verbose = TRUE,
  paste.alias = TRUE
)

Arguments

pattern

a search string to pass to grepl

x

names of variables to search in (in order of importance, if applicable), if NULL all variables except 'id' and 'date' (which must exist) and 'begin' and 'end' (which might exist) are used as search variables

data

a data set that must contain 'id' and 'date', and optionally 'begin' and 'end'. If the latter are missing, the earliest and latest dates will be used, respectively.

...

arguments (beyond 'pattern' and 'x') passed to grepl

include

length 2 logical vector specifying if lower (first entry) and upper (second entry) bounds are inclusive (TRUE) or not (FALSE)

long

output format, if TRUE all hits have separate row, else the emphasis is on the first hit for each 'id' (by 'date' and 'x'). N.B long = FALSE will be slow for large datasets!

verbose

if TRUE the function will give helpful and/or annoying messages sometimes

paste.alias

if long = FALSE and if 'x' has a names attribute, this will be pasted onto some output variable names, unless you set override this behavour by setting this argument to zero

Value

See grepict for details on output

See Also

grepict, grep


renlund/datma documentation built on June 2, 2025, 5:12 a.m.