check_date {interfacer} | R Documentation |
Checks a set of variables can be coerced to a date and coerces them
Description
Checks a set of variables can be coerced to a date and coerces them
Usage
check_date(
...,
.message = "`{param}` is not a date: ({err}).",
.env = rlang::caller_env()
)
Arguments
... |
a list of symbols |
.message |
a glue specification containing |
.env |
the environment to check (defaults to calling environment) |
Value
nothing. called for side effects. throws error if not all variables can be coerced.
Examples
a = c(Sys.Date()+1:10)
b = format(a)
f = "1970-01-01"
g = NA
check_date(a,b,f,g)
c = c("dfsfs")
try(check_date(c,d, mean))
[Package interfacer version 0.3.3 Index]