Skip to contents

plot_variance() visualizes the PERMANOVA R2 terms stored by the batch audit. Outcome, batch, covariate, and other terms are colored separately so batch dominance is easy to inspect.

Usage

plot_variance(audit, distance = NULL)

Arguments

audit

A moat_audit object.

distance

Optional character vector naming audited distances to plot. When NULL, the first available distance is used. Use "all" to plot all audited distances.

Value

A ggplot2::ggplot() object.

Examples

data("toy_moat")
audit <- moat(toy_moat, outcome = "outcome", batch = "batch", n_perm = 99)
plot_variance(audit, distance = "bray")