View source: R/taxinfo_download.R
taxinfo_download | R Documentation |
Download taxonomic data
taxinfo_download(
query,
fq,
fields,
verbose = sbdi_config()$verbose,
use_data_table = TRUE
)
query |
string: (optional) query of the form field:value (e.g. "genus_s:Leuctra ") or a free text search ("Alaba vibex") |
fq |
string: character string or vector of strings, specifying filters to be applied to the original query.
These are of the form "INDEXEDFIELD:VALUE" e.g. "kingdom:Fungi". See |
fields |
string vector: (optional) a vector of field names to return. Note that the columns of the returned data
frame are not guaranteed to retain the ordering of the field names given here. If not specified, a default list of
fields will be returned. See |
verbose |
logical: show additional progress information? [default is set by sbdi_config()] |
use_data_table |
logical: if TRUE, attempt to read the data.csv file using the fread function from the data.table package. Requires data.table to be available. If this fails, or use_data_table is FALSE, then read.table will be used (which may be slower) |
data frame of results, containing one row per taxon, typically with name, guid, and taxonomic information. The columns returned will depend on the field requested
Associated SBDI web service: https://api.biodiversitydata.se/#ws2
sbdi_fields
, sbdi_config
## Not run:
## simplest usage
x <- taxinfo_download("genus_s:Leuctra ")
## Data for Fabaceae with specified fields
x <- taxinfo_download("family_s:Fabaceae",fields=c("guid","parentGuid","kingdom_s","phylum_s",
"class_s","order_s","family_s","genus_s","scientificName"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.