lookup_interval: Lookup Column Values Based on Date Intervals

Description Usage Arguments Value

View source: R/add.R

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

1
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/PollBasePro documentation built on Nov. 26, 2021, 7:41 p.m.