time_match_rigid: find matches on variables in a given time period

View source: R/time_match.r

time_match_rigidR Documentation

find matches on variables in a given time period

Description

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

Usage

time_match_rigid(
  pattern,
  x = NULL,
  data,
  ...,
  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

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 time_match for details on output

Author(s)

Henrik Renlund

See Also

time_match, grepl


renlund/ucR documentation built on March 25, 2023, 10:10 a.m.