New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prophet_plot_components() error in rowSums(df[, holiday.comps]) : 'x' must be numeric #31
Comments
The following steps should recreate the issue:
Does it? |
I'm experiencing the same issue, but all my columns are numeric, and all the holiday dates are unique. My code was working until I simply unified all holidays under a single label ("campaign", since they were all a special kind of past and future campaigns). Given the error thrown and this line from the rowSums help file...
...it seems like the code isn't set up to handle less than two values of "holiday" (in which case you would simply be passing a vector to rowSums -- thus the error). |
Ah, and it also seems that holiday.comps would occasionally come out as a factor (thus interpreted by R as a numeric position index). |
I'm having an error while trying to plot components (
prophet_plot_components(m, fcst)
) after forecasting with holidays. The error was:To illustrate the error, I run some piece of the function. So, this is what my holiday.comps in prophet_plot_components like:
It has two levels: NYE and Weekends.
So, this is what my
df[, holiday.comps]
.Do this looks wrong? My holidays are only the days where y=1
And the error is in:
The text was updated successfully, but these errors were encountered: