Description Usage Arguments Value Examples
toDate
converts a raw date format (e.g., YY-MM-DD, MM-DD-YYYY, etc) into a normalized
date format (YYYY-MM-DD) as a character vector. This is less clumsy than casting using
as.character(as.Date(..., format = ....))
assuming your goal is to create the
normalized character output. While not intuitive, it will also perform basic validation
and is much, much quicker (through hashing, allowing multiple formats, and short-circuiting)
than alternatives (inat least for my use case where I have many values, many of which are repeated)
1 |
chr.date.raw |
The input date vector, as characters |
lst.date.formats |
Date formats, in the form of a list, with associated validation. For example,
|
log.stop.on.invalid |
Should this function stop if any (non-NA) element of |
The character vector (same ordering) in format YYYY-MM-DD
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.