Description Usage Details See Also Examples
Parse a Date Column
1 2 3 4 5 6 7 | parse_date_col(
data,
col,
quiet = TRUE,
tz = NULL,
locale = Sys.getlocale("LC_TIME")
)
|
Includes evaluation of the variables as dates with origins of 1900-01-01 and 1970-01-01. Since the evaluation of origin is temperamental (ie 91884 is parsed into a date in 1997 which would be difficult to weed out downstream since it is a realistic date), it is not coalesced with the other parsed columns and is reported separately in the output.
1 2 3 4 5 6 | library(tidyverse)
test_data <- tibble(A = c("91884", "", NA, "091884", "09984", "090984", "09/18/1984", "1984-09-18", "9/18/84", "9/9/84", "9-9-84", "9-18-84", "12-18-84"))
test_data %>%
parse_date_col(A)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.