List the group names in a model
qe_groups.RdReturns the unique group names present in a ModelData list or qe_plot
object. Useful when a dataset has more than two groups and you want to
iterate over them or validate a group name before passing it to
qe_group().
Arguments
- x
A
qe_plotobject or aModelDatalist fromqe_model_data()/qe_extract().
Value
A character vector of group names, in the order they appear in the model's group summary table.
Examples
if (FALSE) { # \dontrun{
model <- qe_extract(set)
qe_groups(model)
#> [1] "FirstGame" "SecondGame"
# Useful for iterating over all groups:
lapply(qe_groups(model), function(g) {
qe_plot(model) |> qe_group(g) |> qe_export_html(paste0(g, ".html"))
})
} # }