timeslice: Slice phylogenetic tree at various time depths

Description Usage Arguments Value Author(s) References Examples

View source: R/time_slice.R

Description

This function slices a dated phylogenetic tree at successive time depths back in time by collapsing younger phylogenetic branches into older ones to infer the origins of species assemblages.

Usage

1
timeslice(phy, n = 0.2, collapse = FALSE, ...)

Arguments

phy

A dated phylogenetic tree as an object of class “phylo”.

n

Time depth to slice the phylogenetic tree (often in millions of years for dated trees).

collapse

Logical, collapse internal edges with zero edge length.

...

arguments passed among methods.

Value

A tree with the phylogenetic structure removed at the specified time depth

Author(s)

Barnabas H. Daru darunabas@gmail.com

References

Daru, B.H., van der Bank, M. & Davies, T.J. (2018) Unravelling the evolutionary origins of biogeographic assemblages. Diversity and Distributions 24: 313–324.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(ape)

set.seed(1)
tree <- rcoal(50)
x <- timeslice(tree, .5)

old.par <- par(no.readonly = TRUE)
par(mfrow = c(1, 2))
plot(tree)
axisPhylo()
plot(x)
axisPhylo()
par(old.par)

phyloregion documentation built on May 1, 2021, 9:06 a.m.