Including outputs from get_*()
functions, as well as their
attributes, and all exception behaviors.
attributes
Each output from get_*()
functions have the following attributes:
match (character) - the reason for NA, either 'not found', 'found' or if
ask = FALSE
then 'NA due to ask=FALSE')multiple_matches (logical) - Whether multiple matches were returned by the data source. This can be
TRUE
, even if you get 1 name back because we try to pattern match the name to see if there's any direct matches. So sometimes this attribute isTRUE
, as well aspattern_match
, which then returns 1 resulting name without user prompt.pattern_match (logical) - Whether a pattern match was made. If
TRUE
thenmultiple_matches
must beTRUE
, and we found a perfect match to your name, ignoring case. IfFALSE
, there wasn't a direct match, and likely you need to pick from many choices or further parameters can be used to limit resultsuri (character) - The URI where more information can be read on the taxon
includes the taxonomic identifier in the URL somewhere. This may be missing if the value returned is
NA
exceptions
The following are the various ways in which get_*()
functions behave:
success - the value returned is a character string or numeric
no matches found - you'll get an NA, refine your search or possible the taxon searched for does not exist in the database you're using
more than on match and
ask = FALSE
- if there's more than one matching result, and you have setask = FALSE
, then we can't determine the single match to return, so we give backNA
. However, in this case we do set thematch
attribute to sayNA due to ask=FALSE & > 1 result
so it's very clear what happened - and you can even programatically check this as wellNA due to some other reason - some
get_*()
functions have additional parameters for filtering taxa. It's possible that even though there's results (that is,found
will sayTRUE
), you can get back an NA. This is most likely if the parameter filters taxa after they are returned from the data provider and the value passed to the parameter leads to no matches.