Useful in cases where the supplied scientific name does not find any match in the taxonomic source being queried. This function queries the GBIF Backbone Taxonomy for a supplied scientific name. The scientific name from any successful match is then queried against galah::search_taxa().

try_name_via_gbif(name, target_rank)

Arguments

name

Character. Taxa name to search.

target_rank

Character. Level within envClean::lurank$rank to target.

Value

If no match, NULL. If matched, a tibble ready for input to the overrides argument of make_taxonomy().

Examples

galah::search_taxa("Peziza vesiculosa Bull.: Fr.") # Homonym issue
#> Warning: Search returned multiple taxa due to a homonym issue.
#>  Please provide another rank in your search to clarify taxa.
#>  Use a `tibble` to clarify taxa, see `?search_taxa`.
#>  Homonym issue with "Peziza vesiculosa Bull.: Fr.".
#> Matched 0 of 1 taxonomic search terms in selected atlas (Australia).
#> 1 unmatched search term:
#>  "Peziza vesiculosa Bull.: Fr."
#> 
#> # A tibble: 1 × 2
#>   search_term                  issues 
#>   <chr>                        <chr>  
#> 1 Peziza vesiculosa Bull.: Fr. homonym
try_name_via_gbif("Peziza vesiculosa Bull.: Fr.")
#> Error in try_name_via_gbif("Peziza vesiculosa Bull.: Fr."): argument "target_rank" is missing, with no default