Closed karabanb closed 4 years ago
Similar problem with gg_subseries
:
library(dplyr)
library(tsibble)
library(feasts)
tourism %>%
group_by(Purpose) %>%
summarise(Trips = sum(Trips), .groups = "drop") %>%
gg_subseries(Trips)
Should work now, thanks for the issue and patience! This issue was introduced updating to support vctrs and the plot functions were updated to preserve time classes. For now, I've converted it to dates as the tsibble time classes do not have ggplot date-style labelling support.
gg_season()
library(fpp3)
a10 <- PBS %>%
filter(ATC2=='A10') %>%
select(Month, Concession, Type, Cost) %>%
summarise(TotalC = sum(Cost)) %>%
mutate(Cost = TotalC/1e6)
a10 %>%
gg_season(Cost, labels = 'both') +
ylab('$ milion') +
ggtitle('Seasonal plot: antidiabetic drug sales')
Created on 2020-08-08 by the reprex package (v0.3.0)
gg_subseries()
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(tsibble)
library(feasts)
#> Loading required package: fabletools
tourism %>%
group_by(Purpose) %>%
summarise(Trips = sum(Trips), .groups = "drop") %>%
gg_subseries(Trips)
Created on 2020-08-08 by the reprex package (v0.3.0)
I reinstalled feasts (version 0.1.4 ), the issue remains, do I have to install a different version of feasts / fpp3 ? Many thanks
This is fixed in the development version of the package which is not yet on CRAN.
You can install it with remotes::install_github("tidyverts/feasts")
When I try plot examples from with fpp3 book with
gg_season
(withoutperiod
argument) plots has unwanted and wrong years on x-axis.All examples with declared
period
argument works well.