sp_hyphenate: Hyphenate or underscore species name.

View source: R/utils.R

sp_hyphenateR Documentation

Hyphenate or underscore species name.

Description

Hyphenate or underscore species name.

Usage

sp_hyphenate(
  sp,
  hyphen_rds = TRUE,
  underscore = FALSE,
  area = FALSE,
  results = FALSE
)

Arguments

sp

Species common name (as used in gfdata and gfplot) as a string, e.g. "yelloweye rockfish".

hyphen_rds

If TRUE then return "yelloweye-rockfish.rds" (for saving/loading .rds files of cached data).

underscore

If TRUE then return "yelloweye_rockfish" (for storing R objects), and overrides hyphen being TRUE.

area

If TRUE then return "yelloweye-rockfish-area" (or "yelloweye_rockfish_area") to use for area-restricted analyses.

results

If TRUE then append "results" to name also, for saving .RDS files in data_for_all_species vignette. E.g. return "yelloweye-rockfish-results.rds"

Value

string of adapted species name

Author(s)

Andrew Edwards

Examples

## Not run: 
sp_hyphenate("yelloweye rockfish", underscore = TRUE)

## End(Not run)

pbs-assess/gfiphc documentation built on July 4, 2023, 1:13 p.m.