truncateTree: Truncate a Set of Branching Times

Description Usage Arguments Details Value Note Author(s) Examples

Description

This function is used to truncate a set of branching times derived from a phylogenetic tree. Incomplete taxon sampling causes a spurious decline in the rate of lineage accumulation over time, and this effect becomes more severe towards the present. Likewise, in the absence of dense phylogeographic sampling, it may be desirable to omit the final one or more nodes from the tree. truncateTree permits the user to omit k final nodes, or the final t time units.

Usage

1
truncateTree(x, omit.time = NULL, omit.nodes = NULL, batch = FALSE)

Arguments

x

a numeric vector of branching times

omit.time

remove the final 'omit.time' time units before present from tree

omit.nodes

remove the final 'omit.nodes' nodes before present

batch

if TRUE, processes batch of branching times. FALSE assumes as single set of branching times

Details

Consider a set of branching times x = (100, 80, 50, 40, 30, 20, 10, 5). If you wanted to analyze only the first half of the tree, perhaps due to concern about incomplete sampling, calling truncateTree(x, omit.time = 50) would return a vector of branching times x1 = (50, 30, 0). Likewise, if you wished to omit the final 2 branching times, truncateTree(x, omit.nodes = 2) would return x2 = (90, 70, 40, 30, 20).

'batch' implies that you are entering a matrix or dataframe of branching times for multiple trees, as returned by getBtimes.batch. The 'omit.time' option is not available for batch processing.

Value

a numeric vector of branching times, or if batch = TRUE, a matrix of branching times.

Note

In the absence of dense phylogeographic sampling, it may be desirable to omit the final few nodes.

Author(s)

Dan Rabosky [email protected]

Examples

1
2
3
4
5
  data(plethodon)
  pleth2 <- truncateTree(plethodon, omit.nodes = 2)
  #omits final 2 branching times
  
  plotLtt(pleth2)

laser documentation built on Jan. 15, 2017, 4:49 p.m.