rvertnet (version 0.5.0)

vertsearch: Find records using a global full-text search of VertNet archives.

Description

Returns any record containing your target text in any field of the record.

Usage

vertsearch(taxon = NULL, ..., limit = 1000, compact = TRUE,
  verbose = TRUE)

Arguments

taxon

(character) Taxonomic identifier or other text to search for

...

(character) Additional search terms. These must be unnamed

limit

(numeric) Limit on the number of records returned. If >1000 results, we use a cursor internally, but you should still get up to the results you asked for. See also bigsearch to get larger result sets in a text file via email.

compact

Return a compact data frame (boolean)

verbose

Print progress and information messages. Default: TRUE

Value

A data frame of search results

Details

vertsearch performs a nonspecific search for your input within every record and field of the VertNet archives. For a more specific search, try searchbyterm

References

https://github.com/VertNet/webapp/wiki/The-API-search-function

Examples

Run this code
# NOT RUN {
out <- vertsearch(taxon = "aves", "california", limit=10)

# Limit the number of records returned (under 1000)
out <- vertsearch("(kansas state OR KSU)", limit = 200)
# Use bigsearch() to retrieve >1000 records

# Find multiple species using searchbyterm():
# a) returns a specific result
out <- searchbyterm(genus = "mustela", species = "(nivalis OR erminea)")
vertmap(out)

# b) returns a non-specific result
out <- vertsearch(taxon = "(mustela nivalis OR mustela erminea)")
vertmap(out)

# c) returns a non-specific result
splist <- c("mustela nivalis", "mustela erminea")
out <- lapply(splist, function(x) vertsearch(taxon = x, lim = 500))
library("plyr")
out <- ldply(lapply(out, "[[", "data"))
vertmap(out)
# }

Run the code above in your browser using DataCamp Workspace