Checks metadata for ages over ninety that should be censored.
check_ages_over_90( data, col = "ageDeath", strict = FALSE, success_msg = "No ages over 90 detected", fail_msg = "Ages over 90 detected in the data" )
data | Data to check |
---|---|
col | Name of age column(s). Defaults to |
strict | If |
success_msg | Message indicating the check succeeded. |
fail_msg | Message indicating the check failed. |
A condition object indicating whether the data contains ages over ninety.
#> <check_warn: Ages over 90 detected in the data># Can check multiple columns dat <- data.frame(age1 = c(50, 55), age2 = c(90, 95)) check_ages_over_90(dat)#> <check_pass: No ages over 90 detected>