place.fossils: Place fossil samples from one tree in another tree, or find...

View source: R/subsampling.R

place.fossilsR Documentation

Place fossil samples from one tree in another tree, or find the ancestral node for each fossil sample in one tree.

Description

If "ext.tree" is not supplied, this function will find the direct ancestral node for each of the supplied fossil samples. If "ext.tree" is supplied, this function will find the direct ancestral node for each fossil in "ext.tree". This second behaviour is used for placing fossils simulated on a complete Birth-Death tree in the extant-only counterpart tree. This results in fossil samples being placed in the crown clades of the tree upon which they were simulated. When "ext.tree" is supplied, any fossil samples appearing before the MRCA of the crown group are discarded.

Usage

place.fossils(tree, fossils, ext.tree)

Arguments

tree

an object of class "Phylo".

fossils

an object of class "fossils" that corresponds to fossil occurrences for the "tree" argument.

ext.tree

an object of class "Phylo" representing the extant counterpart to "tree", this can be obtained with prune.fossil.tips(tree).

Value

a vector of node numbers corresponding to the direct ancestor of each fossil sample in "fossils".

Examples

t = TreeSim::sim.bd.taxa(10, 1, 0.1, 0.05)[[1]]
f = sim.fossils.poisson(0.1, t, root.edge = FALSE)
place.fossils(t,f)

FossilSim documentation built on Oct. 5, 2023, 5:08 p.m.