addFossilToPhy: add a fossil to an interior branch of a time-scaled phylogeny

Description Usage Arguments Value Author(s) References Examples

View source: R/addFossilToPhy.R

Description

the function takes a time-scaled phylogeny and adds a fossil at a branch in the past

Usage

1
2
3
4
5
6
7
8
addFossilToPhy(
  phy,
  inGroup,
  fossil,
  fossilAge,
  minLength = 0.1,
  maxLength = NULL
)

Arguments

phy

Input phylogeny an object of class phylo (see ape)

inGroup

vector of tip labels defined as the ingroup - the fossil(s) will be placed on the stem branch leading to the 'inGroups' most recent common ancestor

fossil

tip labels for the new fossil

fossilAge

age of the fossil

minLength

minimum length leading to the fossil

maxLength

maximum length leading to the fossil. If NULL (default) then the maximum bound is half the length of the branch leading to the crown node

Value

the the time-scaled phylogeny with the fossil attached

Author(s)

Mark Puttick

References

Puttick, M. N., Kriwet, J., Wen, W., Hu, S., Thomas, G. H., & Benton, M. J. (2017). Body length of bony fishes was not a selective factor during the biggest mass extinction of all time. Palaeontology, 60, 727-741.

Examples

1
2
3
4
5
6
7
data(anolis.tree)
plot(anolis.tree)
nodelabels(214, 214)
# add fossil to node 214
in.groups <- node.descendents(x=214, phy=anolis.tree, tip.labels=TRUE)[[2]]
fossilPhy <- addFossilToPhy(anolis.tree, in.groups, fossil="fakeFossil", fossilAge=60)
plot(fossilPhy)

PuttickMacroevolution/motmot documentation built on June 5, 2020, 7 p.m.