Learn R Programming

velociraptr (version 1.0)

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

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

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.

Value

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

Details

rangeDiversity converts the output of ageRanges into a vector of range-through richness in million year increments. Note that this function is hard-coded to the default field names from the paleobiology database.

Examples

Run this code
# NOT RUN {
# 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")

# }

Run the code above in your browser using DataLab