Adds a logical column indicating whether each row's age falls within the specified range (inclusive on both ends).
Arguments
- dt
A data.table with the specified age variable.
- age_var
Character. Name of the column containing continuous age.
- min_age
Numeric. Minimum eligible age (inclusive).
- max_age
Numeric. Maximum eligible age (inclusive).
- col_name
Character. Name of the eligibility column to create. Default: "eligible_age".
See also
[skeleton_eligible_combine()] to combine multiple eligibility criteria
Other skeleton_eligibility:
skeleton_eligible_combine(),
skeleton_eligible_isoyears(),
skeleton_eligible_no_events_in_window_excluding_wk0(),
skeleton_eligible_no_events_lifetime_before_and_after_baseline(),
skeleton_eligible_no_observation_in_window_excluding_wk0()
