phyExpandData: Expand branch abundance/incience and branch length

Description Usage Arguments Value Examples

View source: R/phyExpandData.r

Description

phyExpandData: Expand branch abundance/incience and branch length

Usage

1
phyExpandData(x, labels, phy, datatype = "abundance")

Arguments

x

a vector/matrix/list of species abundances or a matrix of raw incidence table.

labels

a vector of species name for input data.

phy

a phylogenetic tree with "chaophytree" class.

datatype

data type of input data: individual-based abundance data (datatype = "abundance"), species by sampling-units incidence matrix (datatype = "incidence_raw").

Value

a tibble tree with abundances.

Examples

1
2
3
4
5
6
7
data(phybird.new)
bird.abu <- phybird.new$abun
bird.inc <- phybird.new$inci
bird.lab <- rownames(phybird.new$abun)
bird.phy <- phybird.new$chaophytree
phyExpandData(bird.abu, labels=bird.lab, phy=bird.phy, datatype="abundance")
phyExpandData(bird.inc, labels=bird.lab, phy=bird.phy, datatype="incidence_raw")

chaolab2019/chaoUtility documentation built on Feb. 26, 2020, 2:48 p.m.