match_comm_tree: Match phylogeny with community data

View source: R/utils.R

match_comm_treeR Documentation

Match phylogeny with community data

Description

This function will remove species from community data that are not in the phylogeny. It will also remove tips from the phylogeny that are not in the community data.

Usage

match_comm_tree(comm, tree, comm_2 = NULL)

Arguments

comm

A site by species data frame, with site names as row names.

tree

A phylogeny with "phylo" as class.

comm_2

Another optional site by species data frame, if presented, both community data and the phylogeny will have the same set of species. This can be useful for PCD with custom species pool.

Value

A list of the community data and the phylogeny.


daijiang/phyr documentation built on Feb. 25, 2024, 3:01 a.m.