This function Computes the number of lineages thru time on a network

ltt.network(phy, node_times = NULL)

Arguments

phy

An object of class 'evonet.'

node_times

A numeric vector specifying times of each node. If left NULL then the function will use the output from node.depth.edgelength(phy)

Value

A dataframe that consists of intervals. The first column denotes the start time of the interval while the second column denotes the end time. The third column depicts the number of lineages present in that interval. NOTE: due to computational precision, two nodes that appear to occur on the same time (as in the case of lineage neutral and generative hybridization) may be part of different intervals in the output data frame.

Examples

set.seed(17) ##smallest Quartan prime as seed
##Generate a tree with extinct leaves
net<-sim.bdh.age(1,1,5,2,1,c(1/3,1/3,1/3),hyb.inher.fxn = make.uniform.draw(),complete=TRUE)[[1]]
ltt.network(net)
#>        start       end n_lineages
#> 1  0.0000000 0.2323859          1
#> 2  0.2323859 0.2692951          2
#> 3  0.2692951 0.3477586          3
#> 4  0.3477586 0.5156919          4
#> 5  0.5156919 0.5465409          3
#> 6  0.5465409 0.5718020          3
#> 7  0.5718020 0.5762664          4
#> 8  0.5762664 0.5790803          5
#> 9  0.5790803 0.5930111          4
#> 10 0.5930111 0.6091801          5
#> 11 0.6091801 0.6110932          6
#> 12 0.6110932 0.6530220          5
#> 13 0.6530220 0.7040273          4
#> 14 0.7040273 0.9009002          5
#> 15 0.9009002 0.9110916          6
#> 16 0.9110916 0.9457734          7
#> 17 0.9457734 1.0000000          6