Learn R Programming

nLTT (version 1.4.9)

get_nltt_values: Get the nLTT values in time

Description

Collect the nLTT values in time over all phylogenies in the long form.

Usage

get_nltt_values(phylogenies, dt)

Value

A dataframe of timepoints with the nLTT value of each phylogeny in time

Arguments

phylogenies

the phylogenies, supplied as either a list or a multiPhylo object, where the phylogenies are of type 'phylo'

dt

The timestep resolution, where 1/dt is the number of points evaluated

Author

Richèl Bilderbeek

See Also

Usenltts_diff to compare nLTT statistic between one focal tree and a set of one or more other trees

Examples

Run this code

  # Create some random phylogenies
  phylogeny1 <- ape::rcoal(10)
  phylogeny2 <- ape::rcoal(20)
  phylogeny3 <- ape::rcoal(30)
  phylogeny4 <- ape::rcoal(40)
  phylogeny5 <- ape::rcoal(50)
  phylogeny6 <- ape::rcoal(60)
  phylogeny7 <- ape::rcoal(70)
  phylogenies <- c(phylogeny1, phylogeny2, phylogeny3,
    phylogeny4, phylogeny5, phylogeny6, phylogeny7
  )

  # Obtain the nLTT values
  dt <- 0.2
  nltt_values <- get_nltt_values(phylogenies, dt = dt)

Run the code above in your browser using DataLab