Skip to contents

Controls which groups' mean markers and CI boxes appear in the plot. This is independent of edge rendering — use qe_edges() to select whose network to draw.

Usage

qe_group(
  p,
  ...,
  points = NULL,
  label = NULL,
  color = NULL,
  shape = NULL,
  by = NULL,
  intervals = c("box", "crosshairs", "both", "none"),
  conf_level = 0.95,
  outlier = FALSE,
  fixed_size = FALSE,
  show = TRUE
)

Arguments

p

A qe_plot object.

...

Group names to show means for. Supply one or more strings, each matching a value in the model's group column. Omit entirely to show means for all groups in the model (the default).

points

An arbitrary subset to average — a matrix, data frame or ena.points rows (as rENA's ena.plot.group() accepts). Its mean, t CI and (with outlier) fences are computed here and added as a group named label. Cannot be combined with group names.

label

Name for an explicit mean. Default "mean 1", "mean 2", ….

color

Colour of an explicit mean. Default: next palette colour.

shape

Marker shape for an explicit mean: "square" (default), "circle", "triangle" or "diamond".

by

The metadata column used for grouping (e.g. "Condition"). Optional — used to validate against the column baked into the model at extraction time. An error is raised if the column name does not match.

intervals

"box" (default), "crosshairs", "both" (the box with the crosshairs through the mean) or "none"; TRUE / FALSE are accepted as "box" / "none". rENA's default is "none".

conf_level

Confidence level of the t interval. Default 0.95.

outlier

Also draw the outlier interval (Q1 − 1.5·IQR … Q3 + 1.5·IQR per dimension). Default FALSE.

fixed_size

Logical. When TRUE, group mean markers keep a constant on-screen pixel size regardless of data extent, container size, or zoom. Default FALSE (markers scale with the coordinate space).

show

FALSE hides all group means (as rENA draws none unless asked). A later qe_group() call shows them again.

Value

The modified qe_plot object.

Examples

if (FALSE) { # \dontrun{
# Show means for all groups (default)
qe_plot(set) |> qe_group()

# Show means for specific groups only
qe_plot(set) |> qe_group("FirstGame", "SecondGame")

# Explicit column name — validates against model
qe_plot(set) |> qe_group("FirstGame", by = "Condition")
} # }