chk_is_date_equiv: Check that a scalar or vector is dates or can be coerced to...

Description Usage Arguments See Also Examples

Description

Check that a scalar or vector is dates or can be coerced to dates

Usage

1
2
3
4
5
6
7

Arguments

x

A scalar or a vector.

name

The name for x that will be used in error messages.

See Also

chk_is_date for a stricter test, and err_tdy_date_scalar and err_tdy_date_vector to coerce where necessary.

Examples

1
2
3
4
x <- as.Date("2001-12-31")
chk_is_date_equiv_scalar(x, name = "x")
x <- as.Date(c("2001-12-31", "2002-01-01"))
chk_is_date_equiv_vector(x, name = "x")

johnrbryant/demcheck documentation built on Dec. 31, 2021, 11:57 a.m.