date_with_pbdb: Date with Paleobiology Database and paleotree.

View source: R/tree_from_taxonomy.R

date_with_pbdbR Documentation

Date with Paleobiology Database and paleotree.

Description

This will take a topology, look up information about fossils for taxa on the tree, and use paleotree::timePaleoPhy() to compute branch lengths.

Usage

date_with_pbdb(phy, recent = FALSE, assume_recent_if_missing = TRUE)

Arguments

phy

A phylo object.

recent

If TRUE, forces the minimum age to be zero for any taxon

assume_recent_if_missing

If TRUE, any taxon missing from PBDB is assumed to be recent.

Value

A dated tree.

Examples

## Not run:  # This is a flag for package development. You are welcome to run the example.

taxa <- c(
  "Archaeopteryx", "Pinus", "Quetzalcoatlus", "Homo sapiens",
  "Tyrannosaurus rex", "Megatheriidae", "Metasequoia", "Aedes", "Panthera"
)
phy <- tree_from_taxonomy(taxa, sources = "The Paleobiology Database")$phy

## End(Not run) # end dontrun

phylotastic/datelife documentation built on Jan. 17, 2024, 11:10 p.m.