tidyverts / feasts

Feature Extraction And Statistics for Time Series
https://feasts.tidyverts.org/
291 stars 23 forks source link

autoplot problem #120

Closed jelewis closed 3 years ago

jelewis commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Hi, Thanks. Sorry I didn't see this info before. John Lewis

On Mon, Nov 9, 2020 at 6:46 PM mitchelloharawild notifications@github.com wrote:

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().

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()

https://camo.githubusercontent.com/9624e1e8458e800183d779377fb8fd9c1dab6a57c27a7d9fb85d2928d7a23a3b/68747470733a2f2f692e696d6775722e636f6d2f7369497532356f2e706e67

Created on 2020-11-10 by the reprex package https://reprex.tidyverse.org (v0.3.0)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tidyverts/feasts/issues/120#issuecomment-724351746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIHHC5OKEDQYYZG3RSKX3TSPB5N7ANCNFSM4TP7DOGA .

mitchelloharawild commented 3 years ago

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