{casteval}
allows plotting of forecasts with up to 2 groups.
This function finds all group columns with more than one value in them.
Examples
casteval:::get_plotting_groups(data.frame(time=1, val=2))
#> character(0)
casteval:::get_plotting_groups(data.frame(time=1:3, val=4:6, grp_var=7:9, grp_loc=8:10))
#> [1] "grp_var" "grp_loc"
casteval:::get_plotting_groups(
data.frame(time=1:3, val=4:6, grp_var=7:9, grp_loc=10:12, grp_sce=13:15)
)
#> [1] "grp_var" "grp_loc" "grp_sce"
casteval:::get_plotting_groups(
data.frame(time=1:3, val=4:6, grp_var=7:9, grp_loc=c(1,1,1), grp_sce=13:15)
)
#> [1] "grp_var" "grp_sce"