lookup_interval: Lookup Column Values Based on Date Intervals

View source: R/add.R

lookup_intervalR Documentation

Lookup Column Values Based on Date Intervals

Description

Sometimes we need to lookup a value at a particular time based on a date range in another dataset. This function provides a wrapper to data.table to make this quick and easy.

Usage

lookup_interval(lookup_date, interval_data, variable)

Arguments

lookup_date

A column of dated data.

interval_data

A dataset including columns called "start" and "end".

variable

The variable to select values from in the interval_data.

Value

A tibble of data.


jackobailey/britpol documentation built on Aug. 6, 2023, 2:30 a.m.