timeLadderTree: Resolve Polytomies by Order of First Appearance

View source: R/timeLadderTree.R

timeLadderTreeR Documentation

Resolve Polytomies by Order of First Appearance

Description

Resolves polytomies in trees with lineages arranged in a pectinate pattern (i.e. a ladder-like subtree), ordered by the time of first appearance (FAD) for each lineage.

Usage

timeLadderTree(tree, timeData)

Arguments

tree

A phylogeny, as an object of class phylo.

timeData

Two-column matrix of per-taxon first and last occurrences in absolute continuous time.

Details

This method of resolving polytomies assumes that the order of stratigraphic appearance perfectly depicts the order of branching. This may not be a good assumption for poorly sampled fossil records.

This function is for resolving trees when a continuous time-scale is known. For discrete time-scales, see the function bin_timePaleoPhy.

Taxa with the same identical first appearance date will be ordered randomly. Thus, the output is slightly stochastic, but only when ties exist. This is probably uncommon with real data on continuous time-scales.

Taxa not shared between the input tree and the timeData matrix, or listed as having a FAD or LAD of NA in timeData will be dropped and will not be included in the output tree.

See this blog post for more information:

https://nemagraptus.blogspot.com/2012/07/resolving-polytomies-according-to.html

Value

Returns the modified tree as an object of class phylo, with no edge lengths.

Author(s)

David W. Bapst

See Also

di2multi

Examples


set.seed(444)
record <- simFossilRecord(p = 0.1, q = 0.1, nruns = 1,
	nTotalTaxa = c(100,200))
taxa <- fossilRecord2fossilTaxa(record)
tree <- taxa2cladogram(taxa)
ranges <- sampleRanges(taxa,r = 0.5)
tree1 <- timeLadderTree(tree,ranges)
layout(1:2)
plot(ladderize(tree),show.tip.label = FALSE)
plot(ladderize(tree1),show.tip.label = FALSE)

#an example with applying timeLadderTree to discrete time data
rangeData <- binTimeData(ranges,int.len = 5)	#sim discrete range data
tree2 <- bin_timePaleoPhy(tree,timeList = rangeData,timeres = TRUE)
plot(ladderize(tree),show.tip.label = FALSE)
plot(ladderize(tree2),show.tip.label = FALSE)
axisPhylo() 

layout(1)


paleotree documentation built on Aug. 22, 2022, 9:09 a.m.