aov_one_var: Analysis of variance for one variable

aov_one_varR Documentation

Analysis of variance for one variable

Description

Performs one-way ANOVA for a single variable in a dataset.

Usage

aov_one_var(dataset, x.val, groups, doTukey = TRUE)

Arguments

dataset

Dataset to analyze.

x.val

Variable name or x value to test.

groups

Grouping factor.

doTukey

Logical. If TRUE, also performs TukeyHSD post-hoc test.

Value

A list with p-value, -log10(p), FDR, and optional Tukey results.

Examples

datamatrix <- matrix(
  c(10, 11, 20, 21,
    5,  6,  5,  6),
  nrow = 2,
  byrow = TRUE,
  dimnames = list(c("x1", "x2"), c("s1", "s2", "s3", "s4"))
)
metadata <- data.frame(
  group = factor(c("A", "A", "B", "B")),
  row.names = c("s1", "s2", "s3", "s4")
)
dataset <- list(data = datamatrix, metadata = metadata)
aov_one_var(dataset, "x1", metadata$group, doTukey = FALSE)


specmine documentation built on Aug. 5, 2026, 5:06 p.m.