This function searches the Algaebase API for species based on genus and species names. It allows for flexible search parameters such as filtering by exact matches, returning the most recent results, and including higher taxonomy details.
Usage
get_algaebase_species(
genus,
species,
apikey,
higher = TRUE,
unparsed = FALSE,
newest_only = TRUE,
exact_matches_only = TRUE
)
Arguments
- genus
A character string specifying the genus name.
- species
A character string specifying the species or specific epithet.
- apikey
A character string containing the API key for accessing the Algaebase API.
- higher
A logical value indicating whether to include higher taxonomy details (default is
TRUE
).- unparsed
A logical value indicating whether to print the full JSON response from the API (default is
FALSE
).- newest_only
A logical value indicating whether to return only the most recent entries (default is
TRUE
).- exact_matches_only
A logical value indicating whether to return only exact matches (default is
TRUE
).
Value
A data frame with details about the species, including taxonomic status, ranks, and other relevant information.
Details
This function queries the Algaebase API for species based on the genus and species names, and filters the results based on various parameters. The function handles different taxonomic ranks and formats the output for easy use. It can merge higher taxonomy data if requested.
Examples
if (FALSE) { # \dontrun{
# Search for a species with exact matches only, return the most recent results
result <- get_algaebase_species(
genus = "Skeletonema", species = "marinoi", apikey = "your_api_key"
)
# Print result
print(result)
} # }