phylobeta_core: Phylogenetic beta diversity

Description Usage Arguments See Also Examples

View source: R/phylo_beta.R

Description

beta_sparse_core and phylobeta_core computes efficiently for large community matrices and trees the nesseary quantitities used by the betapart package to compute pairwise and multiple-site phylogenetic dissimilarities.

Usage

1
2
3

Arguments

x

an object of class Matrix or matrix

phy

a phylogenetic tree (object of class phylo)

See Also

read.community PD

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(ape)
tree <- read.tree(text ="((t1:1,t2:1)N2:1,(t3:1,t4:1)N3:1)N1;")
com <- matrix(c(1,0,1,1,0,0,
                1,0,0,1,1,0,
                1,1,1,1,1,1,
                0,0,1,1,0,1), 6, 4,
              dimnames=list(paste0("g",1:6), tree$tip.label))
pbc <- phylobeta_core(com, tree)
library(betapart)
phylo.beta.multi(pbc)
phylo.beta.pair(pbc)

darunabas/bioregion documentation built on Oct. 27, 2019, 6:57 a.m.