Description Usage Arguments Value Author(s) See Also Examples
Wrapper function for pairwise multiple comparisons using 'adonis2' from package 'vegan', and adjusted p-values using 'p.adjust()'.
1 2 3 4 5 6 7 8 | permanova_pairwise(
x,
grp,
permutations = 999,
method = "bray",
padj = "bonferroni",
...
)
|
x |
Community 'data.frame' or 'dist' object. |
grp |
Vector of groups: factor levels to be compared. |
permutations |
Number of permutations, or else the permutation structure from 'permute::how()'. |
method |
Dissimilarity method from 'vegdist' if 'x' is not a distance matrix, default is 'bray'. |
padj |
The p-value correction method, one of the methods supported by 'p.adjust()'; default is 'bonferroni'. |
... |
Other arguments passed to 'adonis2'. |
Table with pairwise factors, SS, pseudo-F, R^2^, p-value and adjusted p-value.
Rob Smith, inspired by Pedro Martinez Arbizu and Sylvain Monteux.
https://github.com/pmartinezarbizu/pairwiseAdonis
1 2 3 4 5 6 7 8 9 10 | # typical usage:
data(oakwoods, package='ecole')
spe <- oakwoods$spe
env <- oakwoods$env
D <- vegan::vegdist(spe, 'bray')
table(env$thiltype)
permanova_pairwise(x = D, grp = env$thiltype)
# warning when any factor level contains singletons:
table(env$aspclass)
permanova_pairwise(x = D, grp = env$aspclass)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.