aov_all_vars: Analysis of variance

aov_all_varsR Documentation

Analysis of variance

Description

Performs one-way ANOVA for all variables in a dataset.

Usage

aov_all_vars(
  dataset,
  column.class,
  doTukey = TRUE,
  write.file = FALSE,
  file.out = NULL
)

Arguments

dataset

Dataset to analyze.

column.class

Metadata column used to define groups.

doTukey

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

write.file

Logical. If TRUE, writes results to file.

file.out

Output file name.

Value

A data frame with ANOVA results for all variables.

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_all_vars(dataset, "group", doTukey = FALSE)


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