get_species_info: Get Species Information

View source: R/get_species_info.R

get_species_infoR Documentation

Get Species Information

Description

Get Species Information

Usage

get_species_info(species, unident = FALSE, verbose = TRUE)

Arguments

species

A vector of species names. The words can be separated using spaces or underscores. Full names are not required but they will increase the consistency of the results should partial matches return multiple matches.

unident

A logical entry with the default value of FALSE, to match historical output that did not include unidentified groups.

verbose

A logical that specifies if you want to print messages and warnings to the console. The default is TRUE.

Details

Get the scientific name, common name, and strata group for a vector of species.

Value

A data frame with the scientific name in the latin column and in the scientific_name column that has spaces replaced with underscores; common name in the common column and in the common_name column that has spaces replaced with underscores; species values used as input in the input column; and strata used to assess its status in the strata column.

Author(s)

Kelli Faye Johnson

See Also

See PullSpp.fn for information on common and scientific names; and GetStrata.fn for the different stratifications.

Examples

get_species_info(c("sablefish", "petrale"))
# Expect a warning because vermilion doesn't have an strata assigned to it
testthat::expect_message(
  get_species_info(c("vermilion"))
)
# Dusky returns multiple entries
testthat::expect_message(
  get_species_info(c("dusky"))
)


nwfsc-assess/nwfscSurvey documentation built on Nov. 12, 2024, 8:14 p.m.