Learn R Programming

nLTT (version 1.4.9)

nLTTstat: Calculate the difference between two normalized Lineage-Through-Time curves, given two phylogenetic trees.

Description

This function takes two ultrametric phylogenetic trees, calculates the normalized Lineage-Through-Time statistic for both trees and then calculates the difference between the two statistics.

Usage

nLTTstat(tree1, tree2, distance_method = "abs", ignore_stem = TRUE,
               log_transform = FALSE)

Value

The difference between the two nLTT statistics

Arguments

tree1

an object of class "phylo"

tree2

an object of class "phylo"

distance_method

Chosen measurement of distance between the two nLTT curves, options are (case sensitive):
- "abs": use the absolute distance
- "squ": use the squared distance;

ignore_stem

a boolean whether to ignore the stem length

log_transform

a boolean wether to log-transform the number of lineages before normalization

Author

Thijs Janzen

Examples

Run this code
  data(exampleTrees)
  nltt_plot(exampleTrees[[1]])
  nltt_lines(exampleTrees[[2]], lty=2)
  nLTTstat(
    exampleTrees[[1]], exampleTrees[[2]],
    distance_method = "abs", ignore_stem = TRUE)

Run the code above in your browser using DataLab