nltt_diff_exact_calc_extinct: Calculates the exact difference between the nLTT curves of...

View source: R/nltt_diff_exact_extinct.R

nltt_diff_exact_calc_extinctR Documentation

Calculates the exact difference between the nLTT curves of the event times. This includes extinction events.

Description

Calculates the exact difference between the nLTT curves of the event times. This includes extinction events.

Usage

nltt_diff_exact_calc_extinct(
  event_times,
  species_number,
  event_times2,
  species_number2,
  distance_method
)

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

(string) absolute, or squared distance?

Author(s)

Thijs Janzen and Richèl Bilderbeek and Pedro Neves

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_calc_extinct(
  event_times = b_times_n,
  species_number  = lineages_n,
  event_times2 = b_times2_n,
  species_number2 = lineages2_n,
  distance_method = "abs"
)
#'

nLTT documentation built on Aug. 21, 2023, 5:13 p.m.