row_expand_dates | R Documentation |
Expand row given start and end dates
row_expand_dates(dt, start_date_col, end_date_col, new_name)
dt |
input data table |
start_date_col |
start date column |
end_date_col |
end date column |
new_name |
new generated column name |
expanded data table
dt_dates_simple <- data.table::data.table( Start_Date = as.Date(c("2020-02-03", "2020-03-01") ), End_Date = as.Date(c("2020-02-05", "2020-03-02") ), group = c("A", "B") ) row_expand_dates(dt_dates_simple, "Start_Date", "End_Date", "Date")[]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.