Description Usage Arguments Value Author(s) References Examples
Drops extinct tips from tree
1 | drop_extinct(phy, tol = NULL)
|
phy |
a 'phylo' class object |
tol |
tolerance in decimal values for branch lengths |
A 'phylo' class object with extinct tips removed
LJ Harmon, and JW Brown This is a direct port of the geiger function, I import it here for convenience. This code is copied under GPL 3 license.
Pennell M, Eastman J, Slater G, Brown J, Uyeda J, Fitzjohn R, Alfaro M, Harmon L (2014). “geiger v2.0: an expanded suite of methods for fitting macroevolutionary models to phylogenetic trees.” Bioinformatics, 30, 2216-2218
1 2 3 4 5 6 7 8 9 10 11 12 13 | mu <- 0.5 # death rate
lambda <- 2.0 # birth rate
numb_replicates <- 10
numb_extant_tips <- 4
# simulate trees under the GSA so first simulates a tree with
# numb_extant_tips * 100 tips counting each time we have a tree with 10 tips
# then randomly picks one of those trees
tree_list <- sim_sptree_bdp(sbr = lambda,
sdr = mu,
numbsim = numb_replicates,
n_tips = numb_extant_tips)
pruned <- drop_extinct(tree_list[[1]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.