| KruskalTest2 | R Documentation |
The KruskalTest2() is used to perform Kruskal-Wallis test for
grouped data and create compare2-class. This function is only
applicable to two-factor analysis, see KruskalTest for a
single factor version of the function.
KruskalTest2(data, .group1, .group2, y, p.adj = "none", ...)
data |
An |
.group1 |
Grouping variables factor 1. |
.group2 |
Grouping variables factor 2. |
y |
Dependent variable (numeric data). |
p.adj |
method for correcting p-values for multiple comparisons. Default |
... |
Other parameters for |
To facilitate code interpretation, It is recommended to use this function in
conjunction with the calc_compare2 function:
nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = KruskalTest)
An compare2-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,
KruskalTest, LSD, LSD2, HSD,
HSD2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"),
tax = easynem_example("nemtax1.csv"),
meta = easynem_example("nemmeta1.csv"))
nem_test <- nem |>
calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = KruskalTest2)
nem_test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.