Description Usage Arguments Details Value Author(s) Examples
Given a vector of dates or date-times, determine the format if one is used
consistently. If inconsistentencies are found, the function will fail.
See strptime
for examples of format specifications.
1 |
x |
character vector of dates or date-times |
guessDateFormat
is rigid when determining the date format. For
date-times it expects the date and time parts to be separated by a space. It
does not recognize all format specifications, such as the AM/PM indicator.
The time part should have at least one colon to separate hours from minutes.
The date part may have any separator as non-numerical values are removed
before parsing.
Returns a character string representing the format of the date-time variables.
Cole Beck
1 2 | x <- c("2014-01-15", "20140202")
guessDateFormat(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.