Facets created when using gg_season() and gg_subseries() on a tsibble with a factor in its keys are not ordered on the levels of the factor. Here is some reproducible code based on the example documentation of gg_subseries()
tsibbledata::aus_retail |>
filter(
Industry == "Cafes, restaurants and catering services"
) |>
mutate(
State = forcats::fct_infreq(State)
) |>
gg_subseries(Turnover)
I have reordered the State variable based on the frequency of its values, but the facets are still ordered alphabetically ignoring the order of the levels.
Hello,
Facets created when using
gg_season()
andgg_subseries()
on a tsibble with a factor in its keys are not ordered on the levels of the factor. Here is some reproducible code based on the example documentation ofgg_subseries()
I have reordered the
State
variable based on the frequency of its values, but the facets are still ordered alphabetically ignoring the order of the levels.Thank you very much!