phy_beta_div_betw_withn | R Documentation |
Function taking a phyloseq object or a diversity matrix and spits out group-wise interindividual diversity
phy_beta_div_betw_withn( physeq, dist, variab, verbose = FALSE, btwn_pairwise = FALSE )
physeq |
a |
dist |
either specify a metric (see |
variab |
variable to segregate beta diversity values by. must be a |
verbose |
should it print out the steps it is performing? (default is |
btwn_pairwise |
should a third element be calculated and appended to the results? these will be pairwise comparisons of samples in each variable level. |
a data.frame
object containing within and between diversities based on the variable specified. "between_pairwise" are calculated as "for each level of the variable categories, find diversities of all samples belonging to it against all other samples not belonging to it".
library(phyloseq) data(GlobalPatterns) betadiversitiesFull <- phy_beta_div_betw_withn(physeq = GlobalPatterns, dist = "bray", variab = "Site", verbose = TRUE, btwn_pairwise = TRUE) betadiversitiesSimpler <- phy_beta_div_betw_withn(physeq = GlobalPatterns, dist = "bray", variab = "Site", verbose = TRUE, btwn_pairwise = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.