ageRanges: Find the age range for each taxon in a dataframe

Description Usage Arguments Details Value Author(s) Examples

View source: R/ageRanges.R

Description

Find the age range (first occurrence and last occurrence) for each taxon in a PBDB dataset. Can be run for any level of the taxonomic hierarchy (e.g., family, genus).

Usage

1
ageRanges(Data, Taxonomy = "genus")

Arguments

Data

A data frame downloaded from the paleobiology database API.

Taxonomy

A characer string identifying the desired level of the taxonomic hierarchy.

Details

Returns a data frame of that states gives the time of origination and extinction for each taxon as numeric values. Note that older versions of this function automatically dropped hanging factors and NA's, but that cleaning step should ideally be dictated by the user up-front. So that functionality has been dropped. This may introduce breaking chanes in legacy scripts, but is easily fixed by standard data cleaning steps.

Value

A numeric matrix of first and last ages for each taxon, with tax as rownames.

Author(s)

Andrew A. Zaffos

Examples

1
2
3
4
5
# Download a test dataset of Cenozoic bivalves.
# DataPBDB<-downloadPBDB(Taxa="Bivalvia",StartInterval="Cenozoic",StopInterval="Cenozoic")

# Find the first occurrence and last occurrence for all Cenozoic bivalves in DataPBDB
# AgeRanges<-ageRanges(DataPBDB,"genus")

velociraptr documentation built on Aug. 1, 2019, 1:05 a.m.