growthRadPlot: Constructs skeleton plots of radial or proportional radial...

View source: R/growthRadPlot.R

growthRadPlotR Documentation

Constructs skeleton plots of radial or proportional radial measurements made at annuli on fish calcified structures.

Description

Constructs skeleton plots of radial or proportional radial measurements made at annuli on fish calcified structures. These plots can be used to identify clearly incorrect radial measurements.

Usage

growthRadPlot(
  df,
  indivs,
  in.pre = "rad",
  in.var,
  radcap = "radcap",
  agevar = "age",
  proportions = FALSE,
  numperpg = 20,
  xlab = ifelse(proportions, "Radial Measurements", "Proportions of Total Radius"),
  lwd = 2,
  col = "black",
  pch = 124,
  ymar = 5,
  ...
)

Arguments

df

A data frame that contains the radial growth measurement data in one-fish-per-line format.

indivs

A string that contains the variable name or a vector of strings that contains the variable names that identify individual fish in the data frame.

in.pre

A string that indicates the prefix for all variable names that contains the radial growth measurement data in the input data frame.

in.var

A vector of column numbers or variable names that contain the radial growth measurement data in the input data frame.

radcap

A string that contains the variable name that holds the total structure radius at the time of capture.

agevar

A string that contains the variable name that holds the assigned ages.

proportions

A logical that indicates whether raw radial measurements (=FALSE, default) or proportional (of the total radius) measurements are plotted.

numperpg

A numeric that indicates the number of individuals to plot per page.

xlab

A string for labeling the x-axis.

lwd

A numeric that indicates the width of the lines plotted.

col

A string that indicates the color to use for the plotted lines.

pch

A numeric that indicates the plotting character used to mark the annuli. The default (=124) is a vertical line.

ymar

A numeric that indicates how wide the y-axis margin should be for labelling the individuals.

...

Optional arguments sent to the lines() or points().

Details

This function constructs a plot of horizonal lines for each individual with the annular increments marked with vertical lines. This is simply an exploratory graph to allow visual comparison of patterns among individuals.

This function requires one-fish-per-line radial measurement data. This function also assumes that the data frame has the total radius-at-capture and the fish's age.

Value

None. However, a plot is produced.

Author(s)

Derek H. Ogle, dogle@northland.edu

See Also

gReshape

Examples

## ONLY RUN IN INTERACTIVE MODE
if (interactive()) {

data(SMBassWB)
head(SMBassWB)     # to see column names & some data
growthRadPlot(SMBassWB,c("yearcap","gear","fish"),
              in.pre="anu",radcap="radcap",agevar="agecap",ymar=6)

} ## END IF INTERACTIVE MODE


droglenc/FSAmisc documentation built on Jan. 8, 2023, 12:59 a.m.