chk_ge_break_min_age: Check that implied ages are greater than or equal to...

Description Usage Arguments See Also Examples

View source: R/chk-composite.R

Description

Check that implied ages are greater than or equal to 'break_min'

Usage

1
2
3
chk_ge_break_min_age(age, break_min, date, dob, unit)

err_ge_break_min_age(age, break_min, date, dob, unit)

Arguments

age

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

break_min

Integer or NULL. If non-NULL, lowest permissible value 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_date, chk_lt_break_max_age, chk_lt_break_max_date

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
age <- c(20L, 23L)
break_min <- 15L
date <- as.Date(c("2020-03-17", "2020-03-18"))
dob <- as.Date(c("2000-02-01", "1997-01-13"))
unit <- "years"
chk_ge_break_min_age(age = age,
                     break_min = break_min,
                     date = date,
                     dob = dob,
                     unit = unit)

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