Tukey.test | R Documentation |
Performs multiple comparisons in each variable. Variables should
be columns in data
. This function is based on TukeyHSD and
HSD.test from packages stats
and agricolae
for multiple
comparisons. These are subsequently based on aov from stats
for model design.
Tukey.test(
data,
numberOfIndexes,
formula,
balanced,
...,
aov.options,
HSD.options
)
data |
a data frame, columns corresponding to indexes and rows
corresponding to samples. Further columns should be included with metadata.
This is used in argument |
numberOfIndexes |
Integer corresponding to the number of indexes to analyze. This will be take as column numbers by the function. |
formula |
Metadata group name. This will group samples according to a metadata column and specify the model. |
balanced |
whether to perform a balanced (TRUE) or unbalanced (FALSE) test |
... |
Further arguments to be passed to HSD.test or TukeyHSD |
aov.options |
Further arguments to be passed to aov. They
should be included as a list (see |
HSD.options |
Further arguments to be passed to HSD.test. They
should be included as a list (see |
Returns a data frame with as many comparisons as groups, performed for
all variables (determined by numberOfIndexes
). Details about
parameters should be check in TukeyHSD and HSD.test. If
balanced=FALSE
, it returns the comparison
element of
HSD.test.
tukey_balanced<- Tukey.test(alpha_diversity_table,
numberOfIndexes = 4, formula = "location", balanced=TRUE)
tukey_unbalanced<- Tukey.test(alpha_diversity_table,
numberOfIndexes = 4, formula = "location", balanced=FALSE)
tukey_unbalanced_options<- Tukey.test(alpha_diversity_table,
numberOfIndexes = 4, formula = "location", balanced=FALSE,
aov.options=list(qr=TRUE, projections=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.