Learn R Programming

rgbif (version 0.9.7)

occ_spellcheck: Spell check search term for occurrence searches

Description

Spell check search term for occurrence searches

Usage

occ_spellcheck(search, ...)

Arguments

search
(character) query term
...
Further named parameters, such as query, path, etc, passed on to modify_url within GET call. Unnamed parameters will be combined with config.

Value

A boolean if search term spelled correctly, or if not spelled correctly with no suggested alternatives. If spelled incorrectly and suggested alternatives given, we give back a list with slots "correctlySpelled" (boolean) and "suggestions" (list)

Examples

Run this code
## Not run: 
# # incorrectly spelled, with suggested alternative
# occ_spellcheck(search = "kajsdkla")
# 
# # incorrectly spelled, without > 1 suggested alternative
# occ_spellcheck(search = "helir")
# 
# # incorrectly spelled, without no alternatives
# occ_spellcheck(search = "asdfadfasdf")
# 
# # correctly spelled,  alternatives
# occ_spellcheck(search = "helianthus")
# ## End(Not run)

Run the code above in your browser using DataLab