business-science / anomalize

Tidy anomaly detection
https://business-science.github.io/anomalize/
338 stars 60 forks source link

Error when applying to a different dataset: "Error in filter_impl(.data, quo) : Result must have length" #16

Open ha-ri-ni opened 6 years ago

ha-ri-ni commented 6 years ago

Hi,

Thanks for writing a great package. When trying to apply the same functions used in the demo to a different dataset, eg. test.xlsx

we see what looks like a dplyr error message: "Error in filter_impl(.data, quo) : Result must have length"

here's the line which gives the error:

test %>% time_decompose(count, method = "stl")
ajcanepa commented 5 years ago

Hi there, and great job with anomalize!, thanks for it. I have the same problem as reported by @ha-ri-ni . In my case the time series is a pressure dataset of a hyperbarik machine (seems very cnstant over the time). When I run the time_decompose() function the same error message appears. Counterintuitive, using the function stl() from the stats package I can do the job (as you can see from the image supplied). Unfortunatelly, when I force the time_decompose() to use the same stl() algorithm (I think), by using: time_decompose(target = Dato, method = "stl", frequency = "2 seconds", merge = TRUE), the same error message appears. Thanks in advance if you can shed some light on this!

decomposition_using_stl