mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-20 19:12:31 +00:00
handle repeated days for a holiday in R
This commit is contained in:
parent
025c0fec0e
commit
b7a201086d
1 changed files with 2 additions and 1 deletions
|
|
@ -9,7 +9,7 @@
|
|||
globalVariables(c(
|
||||
"ds", "y", "cap", ".",
|
||||
"component", "dow", "doy", "holiday", "holidays", "holidays_lower", "holidays_upper", "ix",
|
||||
"lower", "n", "stat", "trend",
|
||||
"lower", "n", "stat", "trend", "row_number",
|
||||
"trend_lower", "trend_upper", "upper", "value", "weekly", "weekly_lower", "weekly_upper",
|
||||
"x", "yearly", "yearly_lower", "yearly_upper", "yhat", "yhat_lower", "yhat_upper"))
|
||||
|
||||
|
|
@ -323,6 +323,7 @@ make_holiday_features <- function(m, dates) {
|
|||
wide <- m$holidays %>%
|
||||
dplyr::mutate(ds = zoo::as.Date(ds)) %>%
|
||||
dplyr::group_by(holiday, ds) %>%
|
||||
dplyr::filter(row_number() == 1) %>%
|
||||
dplyr::do({
|
||||
if (exists('lower_window', where = .) && !is.na(.$lower_window)
|
||||
&& !is.na(.$upper_window)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue