custom_habitat_template: Make custom habitat for an existing river or a template for a...

View source: R/custom_habitat_template.R

custom_habitat_templateR Documentation

Make custom habitat for an existing river or a template for a new river of interest

Description

Function used to make habitat for rivers listed in get_rivers from the built-in datasets.

Usage

custom_habitat_template(
  species = c("AMS", "ALE", "BBH"),
  built_in = TRUE,
  river
)

Arguments

species

Species for which population dynamics will be simulated. Choices include American shad ("AMS"), alewife ("ALE"), and blueback herring ("BBH").

built_in

A logical indicating whether the custom habitat template is a a subset of built-in habitat datasets for the species indicated.

river

Character string specifying river name or NULL for custom river. If making custom habitat from an existing river in habitat (American shad), habitat_ale (Alewife), or habitat_bbh (Blueback herring), then river must be included in rivers from get_rivers for the target species. Otherwise, an arbitrary character string identifying river name is acceptable.

Value

A data.frame with zero or more observations of 8 variables:

  • river Name of river

  • region Regional grouping, see get_region

  • govt Governmental unit at downstream terminus of habitat unit

  • lat Latitude at downstream terminus of habitat unit

  • lon Longitude at downstream terminus of habitat unit

  • dam_name Name of dam (if available) at downstream terminus of habitat unit

  • dam_order Order of dam at downstream terminus of habitat unit. Cumulatively assigned such that all habitat units upstream of a given dam all have dam_order >= 1.

  • Hab_sqkm Square kilometers of habitat within a habitat unit

Examples

# Select a subset of habitat from a single river
custom_habitat_template(species = "AMS", river = "Hudson")

# Create a template heading that can be used to generate new habitat data
custom_habitat_template(species = "BBH", 
  built_in = FALSE, 
  river = "A fake river")


danStich/anadrofish documentation built on Jan. 17, 2025, 9:46 a.m.