tidyverts / feasts

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

Fix gg_* function label formatters for numeric index #80

Closed mitchelloharawild closed 4 years ago

mitchelloharawild commented 4 years ago

MRE:

library(lubridate)
#> 
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:base':
#> 
#>     date
library(feasts)
#> Loading required package: fabletools
#> 
#> Attaching package: 'fabletools'
#> The following object is masked from 'package:stats':
#> 
#>     decompose
library(tsibble)
#> 
#> Attaching package: 'tsibble'
#> The following objects are masked from 'package:lubridate':
#> 
#>     interval, new_interval
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following object is masked from 'package:tsibble':
#> 
#>     id
#> The following objects are masked from 'package:lubridate':
#> 
#>     intersect, setdiff, union
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
as_tsibble(USAccDeaths) %>% 
  index_by(year = year(index)) %>% 
  summarise(value = sum(value)) %>% 
  gg_subseries(value, period = 2)
#> Error: `yearweek()` doesn't know how to handle the numeric class yet.

Created on 2019-12-03 by the reprex package (v0.2.1)