Learn R Programming

rgbif (version 1.3.0)

occ_spellcheck: Spell check search term for occurrence searches

Description

Spell check search term for occurrence searches

Usage

occ_spellcheck(search, curlopts = list())

Arguments

search

(character) query term

curlopts

list of named curl options passed on to HttpClient. see curl_options for curl options

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")
# }

Run the code above in your browser using DataLab