Learn R Programming

epm (version 1.1.5)

reduceToCommonTaxa: Subset epmGrid to shared taxa

Description

An epmGrid object may contain more taxa with morphological data than taxa with phylogenetic information, or vice versa. This function subsets all epmGrid components to the set of taxa shared across geographic, phenotypic and phylogenetic datasets. This might desirable to ensure that all diversity metrics are based on the same set of taxa.

Usage

reduceToCommonTaxa(x)

Value

new epmGrid object.

Arguments

x

object of class epmGrid

Author

Pascal Title

Examples

Run this code
tamiasEPM
# randomly drop a few species for demonstration
tamiasEPM <- addPhylo(tamiasEPM, ape::drop.tip(tamiasTree, sample(tamiasTree$tip.label, 5)))
tamiasEPM <- addTraits(tamiasEPM, tamiasTraits[-(3:5),])

new <- reduceToCommonTaxa(tamiasEPM)

tamiasEPM
new


Run the code above in your browser using DataLab