Description Usage Arguments Value Examples
This is a wrapper function for multilevel pairwise comparison using adonis() from package 'vegan'. The function returns adjusted p-values using p.adjust().
1 2 | pairwise_adonis(x, factors, sim_method = "bray",
p_adjust_m = "bonferroni", reduce = NULL)
|
x |
Data frame (the community table). |
factors |
Vector (a column or vector with the levels to be compared pairwise). |
sim_method |
Similarity method from vegdist, default is 'bray' |
p_adjust_m |
The p.value correction method, one of the methods supported by p.adjust(), default is 'bonferroni'. |
reduce |
String. Restrict comparison to pairs including these factors. If more than one factor, separate by pipes like: reduce = 'setosa|versicolor' |
Table with the pairwise factors, F-values, R^2, p.value and adjusted p.value.
1 2 3 4 5 6 7 8 9 10 11 12 | data(iris)
pairwise_adonis(iris[, 1:4], iris$Species)
pairwise_adonis(iris[, 1:4], iris$Species, reduce = 'setosa')
# similarity euclidean from vegdist and holm correction
pairwise_adonis(x = iris[, 1:4], factors = iris$Species,
sim_method = 'euclidian', p_adjust_m = 'holm')
#similarity manhattan from daisy and bonferroni correction
pairwise_adonis(x = iris[, 1:4], factors = iris$Species,
sim_method = 'manhattan', p_adjust_m = 'bonferroni')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.