Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vascan_search

Search the CANADENSYS Vascan API.


Description

Search the CANADENSYS Vascan API.

Usage

vascan_search(q, format = "json", raw = FALSE, ...)

Arguments

q

(character) Can be a scientific name, a vernacular name or a VASCAN taxon identifier (e.g. 861)

format

(character) One of json (default) or xml.

raw

(logical) If TRUE, raw json or xml returned, if FALSE, parsed data returned.

...

(list) Further args passed on to crul::verb-GET

Details

Note that we lowercase all outputs in data.frame's, but when a list is given back, we don't touch the list names.

Value

json, xml or a list.

Author(s)

Scott Chamberlain

References

API docs https://data.canadensys.net/vascan/api

Examples

## Not run: 
vascan_search(q = "Helianthus annuus")
vascan_search(q = "Helianthus annuus", raw=TRUE)
vascan_search(q = c("Helianthus annuus", "Crataegus dodgei"), raw=TRUE)

# format type
## json
c <- vascan_search(q = "Helianthus annuus", format="json", raw=TRUE)
library("jsonlite")
fromJSON(c, FALSE)

## xml
d <- vascan_search(q = "Helianthus annuus", format="xml", raw=TRUE)
library("xml2")
xml2::read_xml(d)

# lots of names, in this case 50
splist <- names_list(rank='species', size=50)
vascan_search(q = splist)

# Curl options
invisible(vascan_search(q = "Helianthus annuus", verbose = TRUE))

## End(Not run)

taxize

Taxonomic Information from Around the Web

v0.9.100
MIT + file LICENSE
Authors
Scott Chamberlain [aut] (<https://orcid.org/0000-0003-1444-9135>), Eduard Szoecs [aut], Zachary Foster [aut, cre], Zebulun Arendsee [aut], Carl Boettiger [ctb], Karthik Ram [ctb], Ignasi Bartomeus [ctb], John Baumgartner [ctb], James O'Donnell [ctb], Jari Oksanen [ctb], Bastian Greshake Tzovaras [ctb], Philippe Marchand [ctb], Vinh Tran [ctb], Maëlle Salmon [ctb], Gaopeng Li [ctb], Matthias Grenié [ctb], rOpenSci [fnd] (https://ropensci.org/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.