Learn R Programming

gatoRs (version 1.0.0)

taxa_clean: Taxonomic Cleaning - Filter and resolve taxon names

Description

The taxa_clean() function filters a data frame for relevant results, based on the scientific name given. Filtering can be done with scripts by exact or fuzzy match. Or, for a more controlled approach, this function provides interactive filtering by providing the user with prompts. The interactive method allows the user to manually determine whether they wish to keep results containing certain scientific names.

Usage

taxa_clean(
  df,
  synonyms.list,
  taxa.filter = "fuzzy",
  scientific.name = "scientificName",
  accepted.name = NA
)

Value

Returns data frame with filtered results and new column with the accepted name labeled as "accepted_name".

Arguments

df

Data frame of occurrence records returned from gators_download().

synonyms.list

A list of synonyms for a species.

taxa.filter

The type of filter to be used--either "exact", "fuzzy", or "interactive".

scientific.name

Default = "scientificName". The name of the scientific name column in the data frame.

accepted.name

The accepted scientific name for the species. If provided, an additional column will be added to the data frame with the accepted name for further manual comparison.

Details

This function requires no additional packages.

Examples

Run this code
cleaned_data <- taxa_clean(data, c("Galax urceolata", "Galax aphylla"), taxa.filter = "exact")
cleaned_data <- taxa_clean(data, c("Galax urceolata", "Galax aphylla"),
accepted.name = "Galax urceolata")

Run the code above in your browser using DataLab