popularitree: Get a smaller tree with popular taxa spanning the diversity

Description Usage Arguments Value Examples

Description

This assumes you will have a data.frame of popularity measures and then sum to combine the columns into a single measure.

Usage

1
popularitree(phy, ntax, measures, pd_weighting = 0.5, nrep = 10000)

Arguments

phy

A phylo object

ntax

The final number of taxa you want

measures

Data.frame of the measures of popularity

pd_weighting

How much to weight the pd vs the popularity

nrep

How many replicates to use

Value

A phylo object pruned to the number of taxa

Examples

1
2
3
4
5
6
7
8
big.phy <- rotl::get_study("ot_308")[[1]]
big.phy <- geiger::drop.random(big.phy, ape::Ntip(big.phy) - 20)
measures <- tree_compute_measures(big.phy)
small.phy <- popularitree(phy=big.phy, ntax=5, measures, nrep=100)
par(mfcol=c(1,3))
plot(big.phy)
plot(small.phy)
plot(tree_convert_to_common(small.phy))

bomeara/popularitree documentation built on May 19, 2019, 10:48 p.m.