business-science / anomalize

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

Error in FUN(X[[i]], ...) : object '.group' not found #2

Closed guivivi closed 6 years ago

guivivi commented 6 years ago

Hello,

Thanks for this outstanding group.

Following the code posted in https://business-science.github.io/anomalize/ I have got this error: tidyverse_cran_downloads %>%

Data Manipulation / Anomaly Detection

 time_decompose(count, method = "stl") %>%
 anomalize(remainder, method = "iqr") %>%
 time_recompose() %>%
 # Anomaly Visualization
 plot_anomalies(time_recomposed = TRUE, ncol = 3, alpha_dots = 0.25)

Error in FUN(X[[i]], ...) : object '.group' not found

Is there any way to overcome this error?

Thanks in advance.

Kind regards,

Guillermo

mdancho84 commented 6 years ago

Where is the function failing? Please go through each of the steps one by one. and let me know which function the error occurs at.

JoeFernando commented 6 years ago

I get he same error. The problem is with the viz part of the code: plot_anomalies(time_recomposed = TRUE, ncol = 3, alpha_dots = 0.25)

Reinstalled tibbletime and result was the same

DavisVaughan commented 6 years ago

A quick google search tells me this is likely a ggplot2 issue

https://stackoverflow.com/questions/44988682/ggplot2-scatterplot-error-in-funxi-object-group-not-found

JoeFernando commented 6 years ago

So Davis, how to solve this problem.....any ideas? Keen to try out a few ideas

guivivi commented 6 years ago

Just to confirm, I also got the error in plot_anomalies(time_recomposed = TRUE, ncol = 3, alpha_dots = 0.25)

The same error appears in https://cran.r-project.org/web/packages/anomalize/vignettes/anomalize_quick_start_guide.html when running tidyverse_cran_downloads_anomalized %>% plot_anomalies(ncol = 3, alpha_dots = 0.25)

I'll let you know if I find out any solution.

mdancho84 commented 6 years ago

We've been hearing of a number of errors that are all related to old versions of various packages that anomalize depends on. Try updating your packages and see if it fixes the situation. Please let us know if it does.

mdancho84 commented 6 years ago

This should be fixed now thanks to @MartenMM. Can someone that had the problem please confirm?

JoeFernando commented 6 years ago

Worked!!! Reinstalled the github version. Thank you so much for this, loving it!

mdancho84 commented 6 years ago

Niiiiice! Great work @MartenMM!

MartenMM commented 6 years ago

Yay! My first accepted PR :-)

guivivi commented 6 years ago

After reinstalling the github version it also works for me, many thanks!!