compareFits.MeanSizeComps: Compare fits to mean size comps by fleet among several model...

View source: R/compareFits.MeanSizeComps.R

compareFits.MeanSizeCompsR Documentation

Compare fits to mean size comps by fleet among several model runs

Description

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

Usage

compareFits.MeanSizeComps(
  objs = NULL,
  mdfr = NULL,
  fleets = "all",
  fleet.type = c("survey", "fishery"),
  catch.type = c("index", "retained", "discard", "total"),
  years = "all",
  ci = 0.8,
  plot1stObs = TRUE,
  facet_grid = "m+s~x",
  scales = "free_y",
  linesize = 1,
  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
  • melted dataframe from call to extractFits.MeanSizeComps() (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)

ci
  • confidence interval

plot1stObs
  • flag (T/F) to plot observations only from first case

facet_grid
  • faceting formula for ggplot2::facet_grid()

scales
  • scales parameter for ggplot2::facet_grid()

linesize
  • line width (in mm)

pdf
  • name for output pdf file

showPlot
  • flag (T/F) to show plot

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

Details

Uses extractFits.MeanSizeComps() to extract data. Also uses reshape2::dcast(), wtsUtilities::calcCIs(), wtsUtilities::printGGList().

Value

list of ggplot2 objects, with captions as names


wStockhausen/rCompTCMs documentation built on Sept. 12, 2023, 3:13 p.m.