psdVal(species = "List", units = c("mm", "cm", "in"), incl.zero = TRUE,
addLens = NULL, addNames = NULL)
mm
for millimeters (DEFAULT), cm
for centimeters, and in
for inches.addLens
. See details.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 postion 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.psdCalc
, psdPlot
, psdAdd
, PSDlit
, tictactoe
, lencat
, and rcumsum
for related functionality.# 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))
Run the code above in your browser using DataLab