Skip to contents

This function queries the SLU Artdatabanken API (Dyntaxa) to retrieve parent taxon IDs for the specified taxon IDs. It constructs a request with the provided taxon IDs, sends the request to the SLU Artdatabanken API, and processes the response to return a list of parent taxon IDs.

Usage

get_dyntaxa_parent_ids(taxon_ids, subscription_key, verbose = TRUE)

Arguments

taxon_ids

A vector of numeric taxon IDs for which parent taxon IDs are requested.

subscription_key

A character string containing the subscription key for accessing the SLU Artdatabanken API. A key is provided for registered users at Artdatabanken.

verbose

Logical. Default is TRUE.

Value

A list containing parent taxon IDs corresponding to the specified taxon IDs.

Details

Note: Please review the API conditions and register for access before using the API. Data collected through the API is stored at SLU Artdatabanken. Please also note that the authors of SHARK4R are not affiliated with SLU Artdatabanken.

Examples

if (FALSE) { # \dontrun{
# Get parent taxon IDs for taxon IDs 238366 and 1010380
parent_ids <- get_dyntaxa_parent_ids(c(238366, 1010380), "your_subscription_key")
print(parent_ids)
} # }