| aov_one_var | R Documentation |
Performs one-way ANOVA for a single variable in a dataset.
aov_one_var(dataset, x.val, groups, doTukey = TRUE)
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. |
A list with p-value, -log10(p), FDR, and optional Tukey results.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.