define_var_period: Define a tibble period variable (in days)

Description Usage Arguments

Description

Define a tibble period variable (in days)

Usage

1
2
3
4
define_var_period(event_start_tibble, event_stop_tibble, event_start_var,
  event_stop_var, id, period_name, exclusions = list_holidays_and_weekends(),
  period_target = NA, overwrite_negative = TRUE,
  jitter = Sys.getenv("OLIVER_REPLICA_JITTER"))

Arguments

event_start_tibble

A tibble with a date column representing the start of a period and population_member_id column.

event_stop_tibble

A tibble with a date column representing the stop of a period and population_member_id column.

event_start_var

The name of the date column in event_start_tibble.

event_stop_var

The name of the date column in event_stop_tibble.

period_name

The desired name for the period column to be created in the new tibble.

exclusions

A vector of Interval objects, typically created from list_holidays_and_weekends(). Defaults is a call to list_holidays_and_weekends().

period_target

A numeric value to serve as a threshold value. If provided, a second tibble will be calculated indicating whether or not the period value is less than or equal to the threshold value. Defaults is NA.

overwrite_negative

A binary value indicating whether or not negative interval values should be set to NA. Defaults is TRUE.

population_member_id

A unique identifier for each 'member' of the population of interest. Must be present in both tibbles.


mienkoja/oliveR documentation built on May 6, 2019, 6:01 p.m.