Validate a window argument. It must be a list of two elements (window start and window end), both must be numeric, integerish by default, and window start must be lower or equal than window end.
Source:R/validate.R
validateWindowArgument.RdValidate a window argument. It must be a list of two elements (window start and window end), both must be numeric, integerish by default, and window start must be lower or equal than window end.
Usage
validateWindowArgument(
window,
snakeCase = TRUE,
integerish = TRUE,
empty = TRUE,
nm = deparse1(substitute(window), backtick = TRUE),
call = parent.frame()
)