Skip to content
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

Duplicate holiday dates produces an error #37

Closed
wjhrdy opened this issue Feb 27, 2017 · 1 comment
Closed

Duplicate holiday dates produces an error #37

wjhrdy opened this issue Feb 27, 2017 · 1 comment

Comments

@wjhrdy
Copy link

wjhrdy commented Feb 27, 2017

With a large list of holidays I've found that there will be accidents with the manual creation process. It is helpful if the error message tells you what is wrong instead of giving you an error that doesn't mean anything.

If you run this:

library(prophet)
data = read.csv("https://raw.githubusercontent.com/facebookincubator/prophet/master/R/tests/testthat/data.csv")

holidays <- data_frame(
  holiday = 'duplicate',
  ds = as.Date(c("2012-05-18", "2012-05-18")),
  lower_window = 0,
  upper_window = 0
)

prophet(data, holidays = holidays)

This is the error:

Error in seq.default(.$lower_window, .$upper_window) : 
  'from' must be of length 1

A fix would be to check for duplicate dates and throw an error that says there are redundant holiday dates.

@bletham
Copy link
Contributor

bletham commented Feb 28, 2017

Thanks, since this was working in Python I went ahead and made a commit that fixes it in R. If you install from github it should work for you.

@bletham bletham closed this as completed Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants