Learn R Programming

paleoDiv (version 0.4.6)

tree.ages.spp: Automatically build matrix for time-calibration of phylogenetic trees using occurrence data.

Description

Automatically build matrix for time-calibration of phylogenetic trees using occurrence data.

Usage

tree.ages.spp(phylo0, data)

Value

A two-column matrix containing earliest and latest occurrences for each taxon in taxa, with taxon names as row names

Arguments

phylo0

Either an object of class phylo, or a character vector containing taxon names for building the matrix

data

A higher-level taxon name to get data for in the paleobiology database, or a data.frame containing a species table containing entries for the taxa in question.

Details

tree.ages looks for the taxon names in the tna column of a taxon-range table (as produced by mk.sptab()), so it will only recover ages for taxa that can be found there. For a function optimized for higher-level taxa that might not be represented in such a table, see tree.ages(). It is highly recommended to manually inspect the resulting table for accuracy.

Examples

Run this code
data(archosauria)
data(tree_archosauria)
tree.ages.spp(tree_archosauria,data=archosauria$sptab_Ornithopoda)->ages

Run the code above in your browser using DataLab