View source: R/nltt_diff_exact_extinct.R
nltt_diff_exact_extinct | R Documentation |
Takes branching times such as (for example) as returned by the DDD package.
nltt_diff_exact_extinct(
event_times,
species_number,
event_times2,
species_number2,
distance_method = "abs",
time_unit = "since",
normalize = TRUE
)
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. |
Pedro Neves and Richèl Bilderbeek and Thijs Janzen
# 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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.