pow_search: Search Kew's Plants of the World

View source: R/pow_search.R

pow_searchR Documentation

Description

Search Kew's Plants of the World

Usage

pow_search(sci_com, limit = 100, cursor = "*", sort = NULL, q = NULL, ...)

Arguments

sci_com

(character) query terms, scientific or common name

limit

(integer) Number of records to return. default: 100

cursor

(character) cursor string

sort

(character) The field to sort by and sort order separted with underscore, e.g., sort="name_desc"

q

Deprecated, see sci_com

...

Further args passed on to crul::HttpClient.

Value

a list with slots for metadata (meta) with list of response attributes, and data (data) with a data.frame of results

Author(s)

Scott Chamberlain,

References

http://powo.science.kew.org/

See Also

Other pow: get_pow(), pow_lookup(), pow_synonyms()

Examples

## Not run: 
x <- pow_search(sci_com = "Quercus")
x$meta
x$meta$totalResults
x$meta$perPage
x$meta$totalPages
x$meta$page
x$meta$cursor
head(x$data)

# pagination
pow_search(sci_com = "sunflower", limit = 2)

# debug curl stuff
invisible(pow_search(sci_com = "Helianthus annuus", verbose = TRUE))

# sort
desc <- pow_search(sci_com = "Helianthus", sort = "name_desc")
desc$data$name
asc <- pow_search(sci_com = "Helianthus", sort = "name_asc")
asc$data$name

## End(Not run)

taxize documentation built on Sept. 11, 2024, 6:13 p.m.