phylobeta: Phylogenetic beta diversity

Description Usage Arguments Value Author(s) See Also Examples

View source: R/phylo_beta.R

Description

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.

Usage

1
2
3
phylobeta_core(x, phy)

phylobeta(x, phy, index.family = "sorensen")

Arguments

x

an object of class Matrix or matrix

phy

a phylogenetic tree (object of class phylo)

index.family

family of dissimilarity indices, partial match of "sorensen" or "jaccard".

Value

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.

Author(s)

Klaus Schliep

See Also

read.community, phylo.betapart.core, beta_core

Examples

1
2
3
4
5
6
7
8
9
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)

phyloregion documentation built on May 1, 2021, 9:06 a.m.