is_extinct: Identify extinct tips from tree

Description Usage Arguments Value References Examples

Description

This is a direct port of the geiger function, I import it here for convenience. This code is copied under GPL 3 license.

Usage

1
is_extinct(phy, tol = NULL)

Arguments

phy

a 'phylo' class object

tol

tolerance in decimal values for branch lengths

Value

A list of the tips that are extinct

References

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

Examples

 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)
is_extinct(tree_list[[1]])

treeducken documentation built on March 3, 2021, 1:11 a.m.