chk_lt_break_max_age: Check that implied ages are less than 'break_max'

Description Usage Arguments See Also Examples

View source: R/chk-composite.R

Description

Check that implied ages are less than 'break_max'

Usage

1
2
3
chk_lt_break_max_age(age, break_max, date, dob, unit)

err_lt_break_max_age(age, break_max, date, dob, unit)

Arguments

age

Integer. Age, typically in years, but can be other unit.

break_max

Integer or NULL. If non-NULL, upper limit for age.

date

Date on which event occurred or measurement made. Object of class Date.

dob

Date of birth. Object of class Date.

unit

Measurement units for age, eg "month".

See Also

chk_ge_break_min_age, chk_ge_break_min_date, chk_lt_break_max_date

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
age <- c(80L, 83L)
break_max <- 85L
date <- as.Date(c("2020-03-17", "2020-03-18"))
dob <- as.Date(c("1940-02-01", "1937-01-13"))
unit <- "years"
chk_lt_break_max_age(age = age,
                     break_max = break_max,
                     date = date,
                     dob = dob,
                     unit = unit)

johnrbryant/demcheck documentation built on Dec. 31, 2021, 11:57 a.m.