date_i_find_format | R Documentation |
The motivation behind this is that as.Date
does not handle correctly its
format
argument, e.g. as.Date("01-12-2001", format = "%Y-%m-%d")
returns
1-12-20
. Tries to match a single character string against regular
expressions representing potential date formats. Returns the format as
something that can be processed by as.Date
if a match is found, and NULL
otherwise.
date_i_find_format(x)
If no matching format can be found, the function returns NULL; if a
matching format is found, the function returned the matched regular
expression (clean date) and its format compatible with as.Date
.
Thibaut Jombart
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.