Description Usage Arguments Value Note See Also Examples
Utilities for detecting the format of date strings
which.format
.which.format
1 2 3 | which.format(x, nTrials = 1, nErrors = 0)
.which.format(txt)
|
x |
character; values to convert to a POSIX date |
nTrials |
integer; number of strings to check before deciding the format |
nErrors |
integer; the number of unparsable strings to allow. If the number of unparseable strings exceeds nErrors, return NA, which means that the strings are either not dates, or not a consistent format. |
txt |
character; value to convert to a POSIXct date |
character, name for the date format
character representing the name of the date format
Internal function that is not exported
1 2 3 4 5 6 7 | x <- c("January 11, 2014", "February 15, 1958", "2015/03/23")
which.format(x, nTrials=3, nErrors=1)
## Not run:
.which.format("January 11, 2014")
.which.format("2014/02/16")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.