make_date_cols | R Documentation |
Function to add "year_of" and "month_of" columns to a dataframe
make_date_cols(df, date_col)
df |
A data frame with a date column |
date_col |
The unquoted name of the date column |
A data frame with the new date columns.
df <- data_frame(date_of = seq.Date(as.Date("2000-01-01"),
as.Date("2000-12-01"),
by = "1 month"),
x = runif(12))
make_date_cols(df, date_of)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.