Learn R Programming

FSA (version 0.9.5)

psdVal: Finds Gabelhouse lengths (for PSD calculations) for a species.

Description

Returns a vector with the five Gabelhouse lengths for a chosen species.

Usage

psdVal(
  species = "List",
  units = c("mm", "cm", "in"),
  incl.zero = TRUE,
  addLens = NULL,
  addNames = NULL,
  showJustSource = FALSE
)

Value

A vector of minimum values for length categories for the chosen species.

Arguments

species

A string that contains the species name for which to find Gabelhouse lengths. See details.

units

A string that indicates the units for the returned lengths. Choices are mm for millimeters (DEFAULT), cm for centimeters, and in for inches.

incl.zero

A logical that indicates if a zero is included in the first position of the returned vector (DEFAULT) or not. This position will be named “substock”. See details.

addLens

A numeric vector that contains minimum length definitions for additional categories. See details.

addNames

A string vector that contains names for the additional length categories added with addLens. See details.

showJustSource

A logical that indicates whether just the literature source information should be returned (TRUE) or not. If TRUE this will NOT return any of the Gabelhouse length information.

IFAR Chapter

6-Size Structure.

Author

Derek H. Ogle, DerekOgle51@gmail.com

Details

Finds the Gabelhouse lengths from data(PSDlit) for the species given in species. The species name must be spelled exactly (within capitalization differences) as it appears in data(PSDlit). Type psdVal() to see the list of species and how they are spelled.

A zero is included in the first position of the returned vector if incl.zero=TRUE. This is useful when computing PSD values with a data.frame that contains fish smaller than the stock length.

Additional lengths may be added to the returned vector with addLens. Names for these lengths can be included in addNames. If addNames is non-NULL, then it must be of the same length as addLens. If addLens is non-NULL but addNames is NULL, then the default names will be the same as the lengths in addLens. The addLens argument is useful for calculating PSD values that are different from the Gabelhouse lengths.

References

Ogle, D.H. 2016. Introductory Fisheries Analyses with R. Chapman & Hall/CRC, Boca Raton, FL.

Guy, C.S., R.M. Neumann, and D.W. Willis. 2006. New terminology for proportional stock density (PSD) and relative stock density (RSD): proportional size structure (PSS). Fisheries 31:86-87. [Was (is?) from http://pubstorage.sdstate.edu/wfs/415-F.pdf.]

Guy, C.S., R.M. Neumann, D.W. Willis, and R.O. Anderson. 2006. Proportional size distribution (PSD): A further refinement of population size structure index terminology. Fisheries 32:348. [Was (is?) from http://pubstorage.sdstate.edu/wfs/450-F.pdf.]

Willis, D.W., B.R. Murphy, and C.S. Guy. 1993. Stock density indices: development, use, and limitations. Reviews in Fisheries Science 1:203-222. [Was (is?) from http://web1.cnre.vt.edu/murphybr/web/Readings/Willis%20et%20al.pdf.]

See Also

See psdCalc, psdPlot, psdAdd, PSDlit, tictactoe, lencat, and rcumsum for related functionality.

Examples

Run this code
# List all of the species
psdVal()
# Demonstrate typical usages
psdVal("Yellow perch")
psdVal("Walleye",units="cm")
psdVal("Bluegill",units="in")
psdVal("Bluegill",units="in",incl.zero=FALSE)
psdVal("Bluegill")
# Demonstrate that it will work with mis-capitalization
psdVal("bluegill")
psdVal("Yellow Perch")
# Demonstrate adding in user-defined categories
psdVal("Bluegill",units="in",addLens=7)
psdVal("Bluegill",units="in",addLens=7,addNames="MinLen")
psdVal("Bluegill",units="in",addLens=c(7,9),addNames=c("MinSlot","MaxSlot"))
psdVal("Bluegill",units="in",addLens=c("MinLen"=7))
psdVal("Bluegill",units="in",addLens=c("MinSlot"=7,"MaxSlot"=9))
psdVal("Bluegill",showJustSource=TRUE)

Run the code above in your browser using DataLab