Learn R Programming

velociraptr (version 1.1.0)

cleanTaxonomy: Clean taxonomic names

Description

Removes NAs and subgenera from the genus column.

Usage

cleanTaxonomy(Data, Taxonomy = "genus")

Arguments

Data

A data frame of taxonomic ocurrences downloaded from the paleobiology database API.

Taxonomy

A character string

Value

Will return a data frame identical to the original, but with the genus column cleaned.

Details

Will remove NA's and subgenera from the genus column of a PBDB dataset. It can also be used on other datasets of similar structure to convert species names to genus, or remove NAs.

Examples

Run this code
# NOT RUN {
# Download a test dataset of Cenozoic bivalves.
# DataPBDB<-downloadPBDB(Taxa="Bivalvia",StartInterval="Cenozoic",StopInterval="Cenozoic")

# Clean up the genus column.
# CleanedPBDB<-cleanTaxonomy(DataPBDB,"genus")

# }

Run the code above in your browser using DataLab