View source: R/date_standardization_helpers.R
date_convert | R Documentation |
Convert characters to dates
date_convert(
data,
cols,
error_tolerance,
timeframe = NULL,
orders,
modern_excel
)
data |
A data frame or linelist |
cols |
date column name(s) |
error_tolerance |
A number between 0 and 1 indicating the proportion of entries which cannot be identified as dates to be tolerated; if this proportion is exceeded, the original vector is returned, and a message is issued; defaults to 0.4 (40 percent). |
timeframe |
A vector of 2 values of type date. If provided, date values
that do not fall within this timeframe will be set to |
orders |
The date codes for fine-grained parsing of dates. This allows for parsing of mixed dates. If a list is supplied, that list will be used for successive tries in parsing. Default orders are: list( world_named_months = c("Ybd", "dby"), world_digit_months = c("dmy", "Ymd"), US_formats = c("Omdy", "YOmd") ) |
modern_excel |
When parsing dates from excel, some dates are stored as
integers. Modern versions of Excel represent dates as the number of days
since 1900-01-01, but pre-2011 Excel for OSX have the origin set at
1904-01-01. If this parameter is |
A data frame where the specified columns have been converted into Date.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.