View source: R/dissimilarity.R
pez.dissimilarity | R Documentation |
As described in Pearse et al. (2014), a dissimilarity metric
compares diversity between communities. WARNING: Phylosor is
presented as a distance matrix here, i.e. it is *not* the fraction
of shared branch length among communities, but rather '1 - shared
branch length'. This means dissimilarity
always returns a
*distance* object, not a similarity object; this is a different
convention from other packages.
pez.dissimilarity( data, metric = c("all", "unifrac", "pcd", "phylosor", "comdist"), abundance.weighted = FALSE, permute = 1000, sqrt.phy = FALSE, traitgram = NULL, traitgram.p = 2, ext.dist = NULL, ... )
data |
|
metric |
default ( |
abundance.weighted |
If TRUE (default is FALSE) metrics are
calculated incorporating species abundances; only |
permute |
Number of permutations for metric (currently only
for |
sqrt.phy |
If TRUE (default is FALSE) your phylogenetic distance matrix will be square-rooted; specifying TRUE will force the square-root transformation on phylogenetic distance matrices (in the spirit of Leitten and Cornwell, 2014). See ‘details’ for details about different metric calculations when a distance matrix is used. |
traitgram |
If not NULL (default), a number to be passed to
|
traitgram.p |
A value for ‘p’ to be used in conjunction with
|
ext.dist |
Supply an external species-level distance matrix for use in calculations. See ‘details’ for comments on the use of distance matrices in different metric calculations. |
... |
additional parameters to be passed to 'metric function(s) you are calling |
Using square-rooted distance matrices, or distance matrices that
incorporate trait information, can be an excellent thing to do, but
(for the above reasons), pez
won't give you an answer for
metrics for which WDP thinks it makes no sense. All results from
this other than comdist
*will always be wrong* if you do not
have an ultrametric tree and square-root (branch lengths
proportional to time) and you will be warned about this. WDP
strongly feels you should only be using ultrametric phylogenies in
any case, but code to fix this bug is welcome.
list object of metric values.
M.R. Helmus, Will Pearse
Pearse W.D., Purvis A., Cavender-Bares J. & Helmus M.R. (2014). Metrics and Models of Community Phylogenetics. In: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology. Springer Berlin Heidelberg, pp. 451-464.
unifrac
Lozupone C.A. & Knight
R. (2005). UniFrac: a new phylogenetic method for comparing
microbial communities. Applied and Environmental Microbiology, 71,
8228-8235.
pcd
Ives A.R. & Helmus M.R. (2010). Phylogenetic
metrics of community similarity. The American Naturalist, 176,
E128-E142.
phylosor
Bryant J.A., Lamanna C., Morlon H.,
Kerkhoff A.J., Enquist B.J. & Green J.L. (2008). Microbes on
mountainsides: Contrasting elevational patterns of bacterial and
plant diversity. Proceedings of the National Academy of Sciences of
the United States of America, 105, 11505-11511.
comdist
C.O. Webb, D.D. Ackerly, and
S.W. Kembel. 2008. Phylocom: software for the analysis of
phylogenetic community structure and trait
evolution. Bioinformatics 18:2098-2100.
pez.shape
pez.evenness
pez.dispersion
data(laja) data <- comparative.comm(invert.tree, river.sites, invert.traits) ## Not run: dissim <- pez.dissimilarity(data) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.