tidyverts / fabletools

General fable features useful for extension packages
http://fabletools.tidyverts.org/
89 stars 31 forks source link

group_by(.id) now failing #95

Closed robjhyndman closed 5 years ago

robjhyndman commented 5 years ago
library(tsibble)
library(dplyr)
library(lubridate)
library(fable)
goog2015 <- tsibbledata::gafa_stock %>%
  filter(Symbol == "GOOG") %>%
  mutate(day = row_number()) %>%
  update_tsibble(index = day, regular = TRUE) %>%
  filter(year(Date) == 2015)
goog2015_tr <- goog2015 %>%
  slice(1:(n()-8)) %>%
  stretch_tsibble(.init = 3, .step = 1)
fc <- goog2015_tr %>%
  model(RW(Close ~ drift())) %>%
  forecast(h=8) %>%
  group_by(.id) %>%
  mutate(h = row_number()) %>%
  ungroup()
#> Quosures can only be unquoted within a quasiquotation context.
#> 
#>   # Bad:
#>   list(!!myquosure)
#> 
#>   # Good:
#>   dplyr::mutate(data, !!myquosure)

Created on 2019-07-18 by the reprex package (v0.3.0)