Learn R Programming

letsHerp (version 0.1.0)

herpAdvancedSearch: Search The Reptile Database website (RDB): Advanced

Description

Creates a search URL for retrieving species lists from RDB based on multiple filters. This URL is primarily used by herpSpecies, but can also be used manually for advanced queries.

If a synonym is provided and can be unambiguously matched to a valid species, the function also prints detailed information for that species.

Usage

herpAdvancedSearch(higher=NULL,
                          genus=NULL,
                          year=NULL,
                          common_name=NULL,
                          synonym=NULL,
                          location=NULL)

Value

A character string containing the URL to be used in herpSpecies.

If a provided synonym corresponds unambiguously to a valid species, the function also prints species information retrieved from RDB to the console.

Arguments

higher

Character string. A higher-level reptile taxon above genus (e.g., "snakes" or "Boidae").

genus

Character string. The current valid name of a reptile genus (e.g., "Apostolepis").

year

Character string. Filters the search by year of species description (e.g., "2025").

common_name

Character string. A common name potentially linked to a species or genus (e.g., "tree boa").

synonym

Character string. A name potentially regarded as a synonym of a valid taxon (e.g., "Boa diviniloqua").

location

Character string. A country or region name used to list species expected to occur there.

Examples

Run this code
# \donttest{
herpAdvancedSearch(higher = "snakes", year = "2010", location = "Brazil")
herpAdvancedSearch(year = "2010 OR 2011 OR 2012")
herpAdvancedSearch(genus = "Apostolepis OR \"Boa\" OR Atractus") #quotes "Boa"
# }

Run the code above in your browser using DataLab