calc_pairwise_permanovas | R Documentation |
The adonis
function in the
vegan
package does not provide a way to calculate
pairwise post-hoc comparisons between factor levels. This function
calculates PERMANOVA results using the adonis
function for all factor level pairs. Raw p values are returned, but it is
recommended to use the provided FDR corrected p values since the multiple
comparisons can raise your likelihood of false positive differences.
calc_pairwise_permanovas(dm, metadata_map, compare_header, n_perm)
dm |
Dissimilarity matrix of class |
metadata_map |
The metadata mapping dataframe with samples matching and in the same order as the ones in the provided dm. |
compare_header |
The header in the metadata mapping dataframe with the factor levels to use for the pairwise comparisons. |
n_perm |
A vector that controls the number of permutations required. |
A dataframe with R2 and P values.
dm = calc_dm(fruits_veggies$data_loaded) calc_pairwise_permanovas(dm, fruits_veggies$map_loaded, "Sample_type")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.