search_species_code: Search for bird species id codes by alphanumeric codes

View source: R/search.R

search_species_codeR Documentation

Search for bird species id codes by alphanumeric codes

Description

This is an advanced function for returning all Bird-related species id codes based on the various alphanumeric codes used by different authorities.

Usage

search_species_code(code = NULL, authority = "BSCDATA", results = "all")

Arguments

code

Vector. Character or numeric code indicating a species for a given authority.

authority

Character. The authority to compare codes against (defaults to "BSCDATA")

results

Character. "all" returns codes for all related species (including subspecies and main species). "exact" returns only the code for exact species indicated by the code.

Details

species_code_search() is deprecated in favour of search_species_code()

Species ids returned reflect both species and sub-species levels.

Value

A data frame of numeric species id codes and names

Examples


# Show all ids
search_species_code()

# Get all species ids for house finches
search_species_code("HOFI")

# Get all species ids for Dark-eyed Juncos
search_species_code("DEJU")

# Get all species ids related to Yellow-rumped Warbler (Myrtle)
# NOTE! This includes Audubon's and the main, Yellow-rumped Warbler species
search_species_code("MYWA")

# Get ONLY specific id related to Yellow-rumped Warbler (Myrtle)
search_species_code("MYWA", results = "exact")

# Use the Christmas Bird Count authority
search_species_code(11609, authority = "CBC")

# Look in more than one authority (note that the code only needs to match on
# of the authorities)
search_species_code("MYWA", authority = c("BCMA", "CBC"))


BirdStudiesCanada/rNatureCounts documentation built on July 3, 2023, 2:06 a.m.