| KruskalTest | R Documentation |
The KruskalTest() is used to perform Kruskal-Wallis test for
grouped data and create compare-class. This function is only
applicable to single factor analysis, see KruskalTest2 for a
two factor version of the function.
KruskalTest(data, .group, y, exact=FALSE, sort=TRUE, .method=c("holm",
"hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"), ...)
data |
An |
.group |
Grouping variables. |
y |
Dependent variable (numeric data). |
exact |
logical. If TRUE, calculate exact Wilcoxon tests. Default |
sort |
logical. If TRUE, sort groups by median dependent variable values.
Default |
.method |
method for correcting p-values for multiple comparisons. |
... |
Other parameters for |
To facilitate code interpretation, It is recommended to use this function in
conjunction with the calc_compare function:
nem_compare <- nem |> calc_compare(.group = con_crop, y = pH, method = KruskalTest)
An compare-class object.
R in Action: Data Analysis and Graphics with R, Second Edition by Robert I. Kabacoff, published by Manning Publications. 178 South Hill Drive, Westampton, NJ 08060 USA. Copyright 2015 by Manning Publications.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest2, WilcoxTest,
KruskalTest2, LSD, LSD2, HSD,
HSD2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_test <- nem |>
calc_compare(.group = Treatments,
y = Mesorhabditis,
method = KruskalTest)
nem_test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.