Skip to contents

Returns 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().

Usage

qe_groups(x)

Arguments

x

A qe_plot object or a ModelData list from qe_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"))
})
} # }