gnr_simple_df {algaeClassify} | R Documentation |
Wrapper function to apply gnr_simple across a data.frame or list of species names
Description
Provides convienent output with a row per name. To streamline merging with original data.
Usage
gnr_simple_df(
df,
name.column,
sourceid = NA,
topscore = TRUE,
numhits = TRUE,
canonical = TRUE,
with_context = TRUE,
...
)
Arguments
df |
data.frame containing names to check |
name.column |
integer or character string with column name containing species names |
sourceid |
integer with data source id from taxize::gnr_datasources() |
topscore |
boolean. Should the best match be returned based on score? |
numhits |
boolean. Should the best match be returned based on the number of sources with a match? |
canonical |
If TRUE, names do not include authorship or date |
with_context |
If TRUE, Match scores are weighted for taxonomic consistency |
... |
Other parameters passed to taxize::gnr_resolve() |
Value
new data.frame original names (orig.name), 1/0 flag for an exact match, the best match (matched.name), and other output from gnr_simple(). scores, and number of hits (matches) from different data sources in gnr_resolve()
Examples
data(lakegeneva)
#example dataset with 50 rows
new.lakegeneva <- genus_species_extract(lakegeneva[1,],'phyto_name')
new.lakegeneva$genus_species <- trimws(paste(new.lakegeneva$genus,
new.lakegeneva$species))
#checking for matches from all GNRS sources:
lakegeneva.namematches <- gnr_simple_df(new.lakegeneva,"genus_species")
lakegeneva.namematches