addPlotStatsSamples: Add statistics to plot

addPlotStatsSamplesR Documentation

Add statistics to plot

Description

Use ggpubr to add statistics to samples or plot

Usage

addPlotStatsSamples(
  p,
  comp.group,
  metadata,
  h.adj = 0.05,
  exact = FALSE,
  second.comp.group
)

Arguments

p

Plot to add statistics to.

comp.group

Metadata column used as the primary grouping variable. Must match a column name of metadata (default = self$comp.group).

metadata

Metadata for samples.

h.adj

Relative vertical offset for displaying the statistical test p-value in the plot, expressed as a % of the maximum y-value (default = 0.05).

exact

Whether to display exact p-values instead of rounded values (default = FALSE).

second.comp.group

Second comparison metric.

Value

ggplot2 object


CRMetrics documentation built on June 2, 2026, 9:08 a.m.