plotWL: Plot of the weight-length relationship by sex

View source: R/plotWL.R

plotWLR Documentation

Plot of the weight-length relationship by sex

Description

Plot the weight-length relationship using ggplot2::ggplot. Sex-specific relationships are plotted if available using shades of gray. Note that sex can be missing and a single relationship for all data will be plotted.

Usage

plotWL(
  length,
  sex,
  weight,
  weight.calc,
  xlab = "Length (cm)",
  ylab = "Weight (kg)"
)

Arguments

length

A vector of fish lengths in mm.

sex

A vector of sexes for each entry in length. Entries must be one of the following: 'U', 'F', 'M', or 'H'.

weight

A vector of empirical weights in kilograms.

weight.calc

A vector of estimated weights output from getweight.

xlab, ylab

A character value specifying the label for an axes of a figure. This is typically passed to ggplot2::xlab or ggplot2::ylab but it can also be passed to the xlab or ylab arguments of plot. No additional formatting will take place.

Author(s)

Kelli F. Johnson

See Also

getWLpars to calculate parameters of the weight-length relationship; getweight to predict weights from empirical lengths


nwfsc-assess/PacFIN.Utilities documentation built on March 19, 2024, 11:54 p.m.