Learn R Programming

rgbif (version 0.9.7)

occ_metadata: Search for catalog numbers, collection codes, collector names, and institution codes.

Description

Search for catalog numbers, collection codes, collector names, and institution codes.

Usage

occ_metadata(type = "catalogNumber", q = NULL, limit = 5, pretty = TRUE, ...)

Arguments

type
Type of data, one of catalogNumber, collectionCode, recordedBy, or institutionCode. Unique partial strings work too, like 'cat' for catalogNumber
q
Search term
limit
Number of results, default=5
pretty
Pretty as true (Default) uses cat to print data, FALSE gives character strings.
...
Further named parameters, such as query, path, etc, passed on to modify_url within GET call. Unnamed parameters will be combined with config.

References

http://www.gbif.org/developer/occurrence#search

Examples

Run this code
## Not run: 
# # catalog number
# occ_metadata(type = "catalogNumber", q=122)
# 
# # collection code
# occ_metadata(type = "collectionCode", q=12)
# 
# # institution code
# occ_metadata(type = "institutionCode", q='GB')
# 
# # recorded by
# occ_metadata(type = "recordedBy", q='scott')
# 
# # data as character strings
# occ_metadata(type = "catalogNumber", q=122, pretty=FALSE)
# 
# # Change number of results returned
# occ_metadata(type = "catalogNumber", q=122, limit=10)
# 
# # Partial unique type strings work too
# occ_metadata(type = "cat", q=122)
# 
# # Pass on options to httr
# library('httr')
# occ_metadata(type = "cat", q=122, config=verbose())
# # occ_metadata(type = "cat", q=122, config=progress())
# ## End(Not run)

Run the code above in your browser using DataLab