View source: R/set_parse_dob_to_cols.R
set_parse_dob_to_cols | R Documentation |
Parse DOB to Separate Year, Month, Day Columns Create separate year, month, day columns from ymd or mdy formatted date.
set_parse_dob_to_cols(df, date_field, date_format = "ymd")
df |
data.frame or data.table with a date field. |
date_field |
Name of the date field/column. |
date_format |
Optional. Date field format. Either "ymd" (Year-Month-Day) or "mdy" (Month-Day-Year). Defaults to "ymd". |
df_with_dob_column <- data.frame(dob = c("11/13/1968")) df_with_parsed_dob <- set_parse_dob_to_cols(df_with_dob_column, date_field = "dob", date_format = "mdy") df_with_parsed_dob dob birth_yr birth_mo birth_dy 1 11/13/1968 1968 11 13
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.