cp_children | R Documentation |
Children
cp_children(dataset_key, taxon_id, ...)
dataset_key |
(character/integer/numeric) dataset identifier |
taxon_id |
(character/integer/numeric) taxon identifier |
... |
curl options passed on to crul::verb-GET |
list with two slots
result
(data.frame/tibble): results, a zero row data.frame
if no results found
meta
(data.frame/tibble): number of results found
chk <- function(x) { z <- tryCatch(crul::ok(x), error = function(e) e) if (inherits(z, "error")) FALSE else z } if (chk("https://api.catalogueoflife.org/version")) { z <- cp_children(dataset_key=1000, taxon_id='1') z z$result if (NROW(z$result) > 0) { z$result$scientificName z$result$created } }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.