Description Usage Arguments Examples
This function is a wrapper for ToDate that takes a character string of integers of length 4 to 8 and attempts to parse out a valid date.
1 2 3 4 5 6 7 | ToDateCleaner(
datestring,
method = "ymd",
fallback_mo = 1,
fallback_day = 1,
debug = FALSE
)
|
datestring |
Numeric string of length 1-8 to interpret |
method |
Position of year, month, day values within the string. Currently ONLY |
fallback_mo |
Month number to insert, if necessary |
fallback_day |
Day number to insert, if necessary |
debug |
If |
1 2 3 4 5 6 | weird_dates <- c('20200101', '2020', '20201', '202001', '20200000'
, '2020001', '20200001', '20200199')
# ToDate returns errors
# But ToDateCleaner attempts to fix the invalid date strings
ToDateCleaner(weird_dates)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.