View source: R/standardize_dates.R
standardize_dates | R Documentation |
This function is designed to convert dates from a mix of formats to standard "Date" format. It can handle dates in POSIX, numeric, Date, or mixed character format.
standardize_dates(x, origin = "1899-12-30", tz = Sys.timezone())
x |
vector, the date data to be converted |
origin |
character, the base date for numeric date format, in the form "YYYY-MM-DD". Defaults to "1899-12-30". |
tz |
character, the time zone to be used if converting from POSIX formats. Defaults to PDT, as this package was written for use in a Seattle-based analysis group, and PDT covers more of the year than PST. This affects both the assumed time zone for any dates in character class with "YYYY-MM-DD hh:mm:ss" format, and the time zone used when converting from dateTime format to date alone. |
A vector of the same length as x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.