nltt_diff_exact_extinct {nLTT} | R Documentation |
Calculates the exact difference between the nLTT curves of the event times. This includes extinction events.
Description
Takes branching times such as (for example) as returned by the DDD package.
Usage
nltt_diff_exact_extinct(
event_times,
species_number,
event_times2,
species_number2,
distance_method = "abs",
time_unit = "since",
normalize = TRUE
)
Arguments
event_times |
event times of the first phylogeny |
species_number |
the number of species at each event time of the first phylogeny |
event_times2 |
event times of the second phylogeny |
species_number2 |
the number of species at each event time of the second phylogeny |
distance_method |
how the difference between the two nLTTs is summed
|
time_unit |
the time unit of the branching times
|
normalize |
should the output be normalized? Default is TRUE. |
Author(s)
Pedro Neves and Richèl Bilderbeek and Thijs Janzen
Examples
# Generate data
n <- 10
b_times_n <- (seq(1, n) / n)
lineages_n <- b_times_n
b_times2_n <- b_times_n * b_times_n
lineages2_n <- b_times2_n
# Calculate nLTT
out <- nLTT::nltt_diff_exact_extinct(
event_times = b_times_n,
species_number = lineages_n,
event_times2 = b_times2_n,
species_number2 = lineages2_n,
time_unit = "ago",
distance_method = "abs"
)
[Package nLTT version 1.4.9 Index]