powered by
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 to check
Name of age column(s). Defaults to ageDeath.
ageDeath
If FALSE, return a "check_warn" object; if TRUE, return a "check_fail" object
FALSE
"check_warn"
TRUE
"check_fail"
Message indicating the check succeeded.
Message indicating the check failed.
A condition object indicating whether the data contains ages over ninety.
# NOT RUN { dat <- data.frame(ageDeath = c(65, 80, 95)) check_ages_over_90(dat) # Can check multiple columns dat <- data.frame(age1 = c(50, 55), age2 = c(90, 95)) check_ages_over_90(dat) # }
Run the code above in your browser using DataLab