Description Usage Arguments Value
View source: R/create_holiday.R
Creates holiday variables to be used in modeling
1 2 3 4 5 6 7 |
data |
Data set with date and character vector of holiday names |
to_weekly |
Should data be converted to weekly data. Defaults to TRUE. |
create_lead_lag |
Should leads and lags be created |
lead_lag_one |
TRUE if lead and lag of the dummy are also 1 instead of -0.5 for lag and 0.5 for lead to capture different effect of lead and lag holiday |
one_holiday_per_week |
If there are two holidays taking place on same week, should only one be select. Default to FALSE since this could change over time. |
Returns list with two data set: holidays_for_ml which is for ML algos and holidays_for_clean which will be used when cleaning the data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.