Retrieves a list of reptile species from The Reptile Database (RDB) based on a search URL, and optionally returns detailed taxonomic information for each species. This function can also save progress to disk during sampling and extract species-specific URLs for further use.

reptSpecies(
  url = NULL,
  showProgress = TRUE,
  dataList = NULL,
  taxonomicInfo = FALSE,
  fullHigher = FALSE,
  getLink = FALSE,
  cores = 1
)

Arguments

url

Character string. A search URL generated via an advanced search on the RDB website or with reptAdvancedSearch.

showProgress

Logical. If TRUE, prints sampling progress in the console. Default is FALSE.

dataList

Optional. A data frame with columns species and url, used to extract taxonomic information from previously sampled species links.

taxonomicInfo

Logical. If TRUE, returns taxonomic information for each species, including order, suborder, family, genus, author, and year. Default is FALSE.

fullHigher

Logical. If TRUE, includes the full higher taxonomic hierarchy as reported by RDB (e.g., including subfamilies). Requires taxonomicInfo = TRUE. Default is FALSE.

Logical. If TRUE, includes the RDB URL for each species (useful for follow-up functions like reptSynonyms). Default is FALSE.

cores

Integer. Number of CPU cores to use for parallel processing. Default is cores = 1.

Value

If taxonomicInfo = FALSE (default), returns a character vector of species names.

If taxonomicInfo = TRUE, returns a data frame with columns: order, suborder (if available), family, genus, species, author, and year.

If fullHigher = TRUE, includes an additional column with the full higher taxa classification.

If getLink = TRUE, includes a column with the URL for each species’ page on RDB.

Examples

# \donttest{
boa <- reptSpecies(reptAdvancedSearch(genus = "Boa"),
                                      taxonomicInfo = TRUE, 
                                      cores = 2)
#> Species found: 52
#> Proceed to reptSpecies() with the returned link
#> 
Getting species names progress: 1.9%
Getting species names progress: 3.8%
Getting species names progress: 5.8%
Getting species names progress: 7.7%
Getting species names progress: 9.6%
Getting species names progress: 11.5%
Getting species names progress: 13.5%
Getting species names progress: 15.4%
Getting species names progress: 17.3%
Getting species names progress: 19.2%
Getting species names progress: 21.2%
Getting species names progress: 23.1%
Getting species names progress: 25.0%
Getting species names progress: 26.9%
Getting species names progress: 28.8%
Getting species names progress: 30.8%
Getting species names progress: 32.7%
Getting species names progress: 34.6%
Getting species names progress: 36.5%
Getting species names progress: 38.5%
Getting species names progress: 40.4%
Getting species names progress: 42.3%
Getting species names progress: 44.2%
Getting species names progress: 46.2%
Getting species names progress: 48.1%
Getting species names progress: 50.0%
Getting species names progress: 51.9%
Getting species names progress: 53.8%
Getting species names progress: 55.8%
Getting species names progress: 57.7%
Getting species names progress: 59.6%
Getting species names progress: 61.5%
Getting species names progress: 63.5%
Getting species names progress: 65.4%
Getting species names progress: 67.3%
Getting species names progress: 69.2%
Getting species names progress: 71.2%
Getting species names progress: 73.1%
Getting species names progress: 75.0%
Getting species names progress: 76.9%
Getting species names progress: 78.8%
Getting species names progress: 80.8%
Getting species names progress: 82.7%
Getting species names progress: 84.6%
Getting species names progress: 86.5%
Getting species names progress: 88.5%
Getting species names progress: 90.4%
Getting species names progress: 92.3%
Getting species names progress: 94.2%
Getting species names progress: 96.2%
Getting species names progress: 98.1%
Getting species names progress: 100.0%
#> Sampling species higher taxa progress:
# }