compareFits.SizeComps: Compare fits to size comps by fleet among several model runs

View source: R/compareFits.SizeComps.R

compareFits.SizeCompsR Documentation

Compare fits to size comps by fleet among several model runs

Description

Function to compare fits to size comps by fleet among several model runs.

Usage

compareFits.SizeComps(
  objs = NULL,
  mdfr = NULL,
  fleets = "all",
  fleet.type = c("survey", "fishery"),
  catch.type = c("index", "retained", "discard", "total"),
  years = "all",
  plot1stObs = TRUE,
  nrow = 5,
  ncol = 4,
  useBars = TRUE,
  usePins = FALSE,
  usePinsAndPts = FALSE,
  useLines = TRUE,
  usePoints = TRUE,
  pinSize = 0.2,
  lineSize = 1,
  pointSize = 1,
  alpha = 0.5,
  stripText = ggplot2::element_text(),
  pdf = NULL,
  showPlot = FALSE,
  verbose = FALSE
)

Arguments

objs
  • object that can be converted into a list of tcsam2013.resLst and/or tcsam02.resLst objects

mdfr
  • dataframe from call to extractFits.SizeComps() (as alternative to objs)

fleets
  • names of fleets to include (or "all")

fleet.type
  • fleet type ('fishery' or 'survey')

catch.type
  • catch type ('index','retained', or 'total')

years
  • years to plot, as numerical vector (or "all" to plot all years)

plot1stObs
  • flag (T/F) to plot observations only from first case, or character vector or cases from which to plot observations

nrow
  • number of rows per page for output plots

ncol
  • number of columns per page for output plots

useBars
  • flag to use bars for observations

usePins
  • flag to use pins for observations

usePinsAndPts
  • flag to add pts to observations when pins are used

useLines
  • flag to use lines for predictions

usePoints
  • flag to use points for predictions

pinSize
  • width of pin line

lineSize
  • prediction line size

pointSize
  • prediction point size

alpha
  • prediction transparency

stripText
  • ggplot2::element_text() object describing font and margin to use for panel strips

pdf
  • name for output pdf file

showPlot
  • flag (T/F) to show plot

verbose
  • flag (T/F) to print diagnostic information

Details

Uses extractFits.SizeComps() to extract results. Also uses wtsUtilities::printGGList().

If years is numeric, plots start with min(years), otherwise they start at the largest half-decade (e.g., 1980, 1985, 1990,...) les than or equal to the min year with observations.

Value

Non-nested list of ggplot2 objects, with captions as names


wStockhausen/rCompTCMs documentation built on Aug. 27, 2024, 7:15 p.m.