LengthGroup: Assign Each Fish to Length Group.

Description Usage Arguments Value Examples

View source: R/clean_length.R

Description

Assigns for each fish 'sub' (sub-legal), 'leg' (legal), 'ovr' (over-legal) based on fishing regulations and measured fork length or total length (cm). If length is NA, then 'unk' (unknown) is used instead. Special case for Green Sturgeon using 'not' post 2006, when it be came illegal to fish for (and keep) said species.

Usage

1
2
3
4
5
6
7
8
LengthGroup(
  data,
  year,
  species = NULL,
  tl = NULL,
  fl = NULL,
  regTable = c("su", "sb")
)

Arguments

data

Dataframe containing (at least) fish length & catch date (year).

year

Field name (not quoted) in data that holds capture (collection) year.

species

Field name (not quoted) in data that holds species.

tl

Field name (not quoted) in data that holds total length.

fl

Field name (not quoted) in data that holds fork length.

regTable

Dataframe of regulation changes with at least the following fields: "MaxYear"; "Species"; "MinLen"; "MaxLen"; and "LenType". Default is 'su' and gets internal 'RegsSturgeon'. Other choice is 'sb' and will get internal 'RegsStriper'.

Value

A character vector with length = nrow(data) & possible values of 'sub', 'leg', 'ovr', 'unk', or 'not'.

Examples

1
# coming soon

jasondubois/sportfish documentation built on July 3, 2020, 1:01 p.m.