Skip to contents

Check eligibility based on no observation of a specific value (excluding baseline week)

Usage

skeleton_eligible_no_observation_in_window_excluding_wk0(
  dt,
  var,
  value,
  window = Inf,
  col_name = NULL
)

Arguments

dt

A data.table with id, isoyearweek and the specified variable. Within each id, the rows MUST be in calendar order.

var

Character. Name of the column to check.

value

The specific value to look for. A row where var is NA counts as no observation.

window

Number of prior ISO weeks to check. 99999 or more, Inf included, means every earlier row. Default: Inf.

col_name

Character or NULL.

Value

The input data.table (invisibly), modified by reference.