Assert that the vector of dates spans at least the specified calibration time
Source:R/checkers.R
assert_sufficient_days_of_data.Rd
Assert that the vector of dates spans at least the specified calibration time
Usage
assert_sufficient_days_of_data(
date_vector,
data_name,
calibration_time,
call = rlang::caller_env(),
add_err_msg = ""
)
Arguments
- date_vector
the vector of dates to check, must be of Date type
- data_name
What data correspond to the dates in
date_vector
. Used to make the error message informative (e.g. "hospital admissions data")- calibration_time
integer indicating the number of days that the dates must span
- call
Calling environment to be passed to
cli::cli_abort()
for traceback.- add_err_msg
add_err_msg string containing an additional error message, default is the empty string (
""
)