Learn R Programming

taxotools (version 0.0.139)

resolve_names: Resolve canonical names against GNA

Description

Resolve names against Global Names Architecture (GNA) to make sure the name exists

Usage

resolve_names(
  taxolist,
  sciname = "canonical",
  score_threshold = 0.98,
  best_match_only = TRUE,
  add_fields = NA,
  verbose = TRUE
)

Value

(data frame) names list resolves

Arguments

taxolist

(data frame) taxonomic list

sciname

() column name for scientific names

score_threshold

(numeric) to make sure names match as desired. Default (0.98) Higher value indicates best match, lower values would return matches at genus level

best_match_only

(logical) If TRUE, best match only returned else return all records returned by GNA. Default: TRUE

add_fields

(character) One of NA (default) , minimal or all. NA adds a logical column 'resolved', Minimal gives back just four fields, whereas all gives all fields back.

verbose

(logical) verbose output, Default: FALSE

See Also

Other Name functions: build_gen_syn(), cast_canonical(), cast_scientificname(), check_scientific(), expand_name(), get_accepted_names(), guess_taxo_rank(), list_higher_taxo(), melt_canonical(), melt_scientificname(), taxo_fuzzy_match()

Examples

Run this code
# \donttest{
mylist <- data.frame("canonical" = c("Abrothrix longipilis",
                                     "Acodon hirtus",
                                     "Akodon longipilis apta",
                                     "AKODON LONGIPILIS CASTANEUS",
                                     "Chroeomys jelskii",
                                     "Acodon jelskii pyrrhotis"),
                     stringsAsFactors = FALSE)
test <- resolve_names(mylist)
test1 <- resolve_names(mylist,add_fields = "minimal")
test2 <- resolve_names(mylist,best_match_only = FALSE,add_fields = "minimal")
test3 <- resolve_names(mylist,best_match_only = FALSE,add_fields = "all")
# }

Run the code above in your browser using DataLab