phylobeta_core | R Documentation |
phylobeta_core
computes efficiently for large community matrices and
trees the necessary quantities used by the betapart package to compute
pairwise and multiple-site phylogenetic dissimilarities.
phylobeta_core(x, phy)
phylobeta(x, phy, index.family = "sorensen")
x |
an object of class Matrix, matrix or phyloseq |
phy |
a phylogenetic tree (object of class phylo) |
index.family |
family of dissimilarity indices, partial match of "sorensen" or "jaccard". |
phylobeta_core
returns an object of class "phylo.betapart",
see phylo.betapart.core
for details. This object can be called
by phylo.beta.pair
or phylo.beta.multi
.
phylobeta
returns a list with three phylogenetic dissimilarity
matrices. See phylo.beta.pair
for details.
Klaus Schliep
read.community
, phylo.betapart.core
,
beta_core
library(ape)
tree <- read.tree(text = "((t1:1,t2:1)N2:1,(t3:1,t4:1)N3:1)N1;")
com <- sparseMatrix(c(1,3,4,1,4,5,1,2,3,4,5,6,3,4,6),
c(1,1,1,2,2,2,3,3,3,3,3,3,4,4,4),x=1,
dimnames = list(paste0("g", 1:6), tree$tip.label))
com
pbc <- phylobeta_core(com, tree)
pb <- phylobeta(com, tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.