join_by_id_date_difference: Fuzzy Join by Days

View source: R/join_by_id_date_difference.R

join_by_id_date_differenceR Documentation

Fuzzy Join by Days

Usage

join_by_id_date_difference(
  data1,
  data2,
  id1,
  id2,
  date1,
  date2,
  mode = "left",
  interval = 90
)

Arguments

data1

first data frame

data2

second data frame

id1

primary key variable from data1

id2

primary key variable from data2

date1

date key variable from data1. This column should be of class "Date," but accepts any numeric value

date2

date key variable from data2. This column should be of class "Date," but accepts any numeric value

mode

specify join type should be "left", "right", "full", "semi", or "anti"; defaults to "left"

interval

absolute value of days over which to match observations by id; default of +/-90 days

Value

data frame comprised of data1 and data2


NeuroShepherd/RankinLabTools documentation built on Sept. 23, 2022, 5:31 p.m.