match_phylo_comm: Match taxa and in phylogeny and community matrix

Description Usage Arguments Details Value Examples

View source: R/phylo_beta.R

Description

match_phylo_comm compares taxa (species, labels, tips) present in a phylogeny with a community matrix. Pruning, sorting and trying to add missing species on genus level if possible to match in subsequent analysis.

Usage

1
match_phylo_comm(phy, comm, delete_empty_rows = TRUE)

Arguments

phy

A phylogeny

comm

A (sparse) community data matrix

delete_empty_rows

delete rows with no observation

Details

Based on the function of the same name in picante but allows sparse matrices and with taxa addition.

Value

A list containing the following elements, pruned and sorted to match one another:

phy

A phylogeny object of class phylo

comm

A (sparse) community data matrix

Examples

1
2
3
4
5
6
data(africa)
tree <- africa$phylo
x <- africa$comm

subphy <- match_phylo_comm(tree, x)$phy
submat <- match_phylo_comm(tree, x)$com

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