taxize (version 0.9.91)

pow_search: Search Kew's Plants of the World

Description

Search Kew's Plants of the World

Usage

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

Arguments

q

(character) query terms

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"

...

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

References

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

See Also

Other pow: get_pow, pow_lookup

Examples

Run this code
# NOT RUN {
x <- pow_search(q = "Quercus")
x$meta
x$meta$totalResults
x$meta$perPage
x$meta$totalPages
x$meta$page
x$meta$cursor
head(x$data)

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

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

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

Run the code above in your browser using DataCamp Workspace