Skip to contents

taxa column in returned data frame is the best match for the name in taxa_col based on the supplied taxonomy.

Usage

bin_taxa(df, taxa_col = "original_name", taxonomy, include_levels = NULL)

Arguments

df

Dataframe to attribute with best result from GBIF Backbone Taxonomy

taxa_col

Character. Name of column in df with taxa.

taxonomy

list with (at least) named elements lutaxa and taxonomy. Usually resulting from call to envClean::make_taxonomy().

include_level

Character (or NULL). Name(s) of any extra columns in taxa$taxonomy to return. e.g. include_levels = "kingdom" will return the kingdom for each taxa.

Value

Dataframe with added column taxa, and possibly include_levels