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

autoplot problem #120

Closed
jelewis opened this issue Nov 9, 2020 · 3 comments
Closed

autoplot problem #120

jelewis opened this issue Nov 9, 2020 · 3 comments

Comments

@jelewis
Copy link

jelewis commented Nov 9, 2020

Previously when I ran STL() with autoplot I had no problem. Now I keep getting this error:
aus_production %>% STL(Beer ~ season(window = Inf)) %>% autoplot()
Error: Objects of type mdl_defn/R6 not supported by autoplot.

Does this mean I should forget about autoplot and just use ggplot2?
Thanks.
John Lewis
jelewis02@gmail.com

@mitchelloharawild
Copy link
Member

mitchelloharawild commented Nov 9, 2020

This behaviour was changed in CRAN v0.1.2, all decomposition methods are now handled with the same interface as models and the decomposed components can be extracted with components().

http://feasts.tidyverts.org/news/index.html#breaking-changes-1

library(fpp3)
#> ── Attaching packages ────────────────────────────────────────────── fpp3 0.3 ──
#> ✓ tibble      3.0.4          ✓ tsibble     0.9.3.9000
#> ✓ dplyr       1.0.2          ✓ tsibbledata 0.2.0     
#> ✓ tidyr       1.1.2          ✓ feasts      0.1.5.9000
#> ✓ lubridate   1.7.9          ✓ fable       0.2.1.9000
#> ✓ ggplot2     3.3.2
#> ── Conflicts ───────────────────────────────────────────────── fpp3_conflicts ──
#> x lubridate::date()   masks base::date()
#> x dplyr::filter()     masks stats::filter()
#> x tsibble::interval() masks lubridate::interval()
#> x dplyr::lag()        masks stats::lag()
aus_production %>% 
  model(STL(Beer ~ season(window = Inf))) %>% 
  components() %>% 
  autoplot()

Created on 2020-11-10 by the reprex package (v0.3.0)

@jelewis
Copy link
Author

jelewis commented Nov 10, 2020 via email

@mitchelloharawild
Copy link
Member

No worries, I've updated the blog post to reflect these changes now.

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