setup_areastrata: Create a data frame of stratifications for each area

View source: R/setup_areastrata.R

setup_areastrataR Documentation

Create a data frame of stratifications for each area

Description

Create a data frame with one row per stratification and stratification names based on which area they fall in. Often, species will be broke into several stocks along a latitudinal gradient as well as stratifications within each area. Where stratifications are based on latitude and depth. All three of these categories are accounted for here.

Usage

setup_areastrata(
  area_lat = c(`CAN-US` = 49, Conception = 34.45, `US-MX` = 32),
  strata_lat = nwfscDeltaGLM::strataLatitudes(),
  strata_depth = nwfscDeltaGLM::strataDepths()
)

Arguments

area_lat

Latitudinal (decimal degree) breaks for each area, including breaks for the north and south boundaries. For example, a single area would have two values, the northern and southern borders. It is helpful if you name the vector like the default vector that has two areas separated at Point Conception.

strata_lat

Latitudinal (decimal degree) breaks for each strata within areas defined by area_lat. No need to repeat values in area_lat. Typical values include the Washington-Oregon border at the mouth of the Columbia River (i.e., 46.0), Point Conception at 34.50, and the management line at 40 degrees 10 minutes (40.166667). Note that the first two values are rounded to the tenth of a degree and only the management line is represented using six decimal places. It is helpful if you name the vector like what is done for the default strata_lat. The default vector is not named, but provides all of the available options for stratification because we are limited by what is available in the survey packages.

strata_depth

Depth breaks that will be included for each strata by area combination. Values are limited to those available in the SA3 data set stored in 'data(SA3, package = "nwfscSurvey").

Value

A data frame with one row per stratification and the following columns:

  • name: a combination of the area and depth for the given stratification,

  • area: the calculated area (todo: units here) for the stratification,

  • Depth_m.1: the minimum depth of the stratification,

  • Depth_m.2: the maximum depth of the stratification,

  • Latitude_dd.1: the southern latitude of the stratification, and

  • Latitude_dd.2: the northern latitude of the stratification.

Author(s)

Kelli F. Johnson

Examples

# Strata for lingcod in 2021
setup_areastrata(
  area_lat = c("CAN-US" = 49.0, "40-10" = round(40 + 10/60, 6), "US-MX" = 32.0),
  strata_lat = c(46.0, 34.5),
  strata_depth = c(55, 183, 400)
)

iantaylor-NOAA/Lingcod_2021 documentation built on Oct. 30, 2024, 6:42 p.m.