Closed romainfrancois closed 2 years ago
Originally in https://github.com/tidyverse/dplyr/issues/6081
library(fabletools) library(fable) lung_deaths_agg <- as_tsibble(cbind(mdeaths, fdeaths)) %>% aggregate_key(key, value = sum(value)) df_mable <- lung_deaths_agg %>% model(lm = TSLM(value ~ trend() + season())) # A mable df_mable #> # A mable: 3 x 2 #> # Key: key [3] #> key lm #> <chr*> <model> #> 1 fdeaths <TSLM> #> 2 mdeaths <TSLM> #> 3 <aggregated> <TSLM> # Not a mable? df_mable[c("key", "lm")] #> # A tibble: 3 × 2 #> key lm #> <chr*> <model> #> 1 fdeaths <TSLM> #> 2 mdeaths <TSLM> #> 3 <aggregated> <TSLM>
Fixed, thanks for the bug report.
Originally in https://github.com/tidyverse/dplyr/issues/6081