View source: R/betadispersion.R
Betadispersion | R Documentation |
This function is based on functions distance,
betadisper and permutest from phyloseq
and vegan
packages. It calculates matrix distances on a
phyloseq-class object (making use of
distance) and then performs an analysis of multivariate
homogeneite of group dispersions (variances) based on the formula
.
Then, it applies permutest on these results. It allows the
user to wrap all these functions and loop over several distance methods
(Bray-Curtis, UniFrac, Weighted UniFrac...).
Betadispersion(
data,
formula,
distances,
permutest.options,
betadisper.options,
type = "Samples",
...
)
data |
a phyloseq-class. For more details, check distance funtion. |
formula |
Model formula to be passed to |
distances |
Character string including multiple distance methods to be used. Further details to be found in distance. |
permutest.options |
Further arguments to be passed to
permutest. They should be included as a list (see
|
betadisper.options |
Further arguments to be passed to
betadisper. They should be included as a list (see
|
type |
character string with the type of comparison to used (sample-wise or taxa-wise, with default c(anova.cca"Samples")). Check distance for further details. |
... |
Further arguments to be passed to distance
function from package |
Returns a list with to elements:
A data frame containing the
tab
component of permutest returns value, for every
distance used. This includes information of sources of variation, degrees of
freedom, sequential sums of squares, mean squares, F statistics,
partial R-squared and p-values, based on N permutations
A list with as many elements as distances were set. Each element includes all information provided by an typical anova.cca result object.
betadisper_location<- Betadispersion(normalized_phyloseq,distances = c("bray",
"unifrac", "wunifrac"), formula = "location", betadisper.options= list( bias.adjust = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.