Apply the given facets to the given plot
Details
If
plotting_groups
is empty,plot
is returned unchangedIf
plotting_groups
has one element,ggplot2::facet_wrap()
is usedIf
plotting_groups
has two elements,ggplot2::facet_grid()
is used
Examples
obs <- groups_obs |> dplyr::filter(grp_scenario==1)
NULL |> plot_observations(obs) |> casteval:::apply_facets(c("grp_variable"))
NULL |> plot_observations(obs) |> casteval:::apply_facets(c("grp_variable", "grp_province"))