Learn R Programming

rvertnet (version 0.8.4)

bigsearch: Request to download a large number of VertNet records.

Description

Specifies a term-wise search (like searchbyterm) and requests that all available records be made available for download as a tab-delimited text file.

Usage

bigsearch(..., rfile, email, messages = TRUE, callopts = list())

Value

Prints messages on progress, but returns NULL

Arguments

...

arguments, must be named, see searchbyterm() for details

rfile

A name for the results file that you will download (character). Required.

email

An email address where you can be contacted when your records are ready for download (character). Required.

messages

(logical) Print progress and information messages. Default: TRUE

callopts

(named list) Curl arguments passed on to crul::verb-GET

Reading data

We suggest reading data in with data.table::fread() - as it's very fast for the sometimes large datasets you will get from using this function, and is usually robust to formatting issues.

Details

bigsearch allows you to request records as a tab-delimited text file. This is the best way to access a large number of records, such as when your search results indicate that >1000 records are available. You will be notified by email when your records are ready for download.

References

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

Examples

Run this code
if (FALSE) {
# replace "big@search.luv" with your own email address
bigsearch(genus = "ochotona", rfile = "pikaRecords", email = "big@search.luv")

# Pass in curl options for curl debugging
bigsearch(genus = "ochotona", rfile = "pikaRecords",
  email = "big@search.luv", verbose = TRUE)

# Use more than one year query
bigsearch(class = "aves", year = c(">=1976", "<=1986"),
          rfile = "test-bigsearch1", email = "big@search.luv")
}

Run the code above in your browser using DataLab