compareData.FleetTimeSeriesABs: Compare time series of abundance or biommass data by fleet...

View source: R/compareData.FleetTimeSeriesABs.R

compareData.FleetTimeSeriesABsR Documentation

Compare time series of abundance or biommass data by fleet among several model scenarios

Description

Function to compare abundance or biomass time series data by fleet among several model scenarios.

Usage

compareData.FleetTimeSeriesABs(
  objs = NULL,
  fleet.type = c("survey", "fishery"),
  catch.type = c("index", "retained", "discard", "total"),
  data.type = c("abundance", "biomass"),
  fleets = "all",
  sexs = "all",
  maturity_states = "all",
  shell_conditions = "all",
  position = ggplot2::position_dodge(0.2),
  ci = 0.8,
  numRecent = 15,
  ylims = NULL,
  facets = "fleet~x",
  scales = "free_y",
  verbose = FALSE
)

Arguments

objs
  • object that can be converted into a list of tcsam2013.resLst and/or tcsam02.resLst objects (or dataframe from call to extractMDFR.Data.FleetTimeSeriesABs())

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

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

data.type
  • data type ('abundance' or 'biomass')

fleets
  • vector of names of fleets to plot (or 'all')

sexs
  • vector of sexes to plot (or 'all')

maturity_states
  • vector of maturity states to plot (or 'all')

shell_conditions
  • vector of shell conditions to plot (or 'all')

position
  • indicates ggplot2 position_ to use ('dodge','jitter','identity',)

ci
  • confidence interval for plots

numRecent
  • number of years for 'recent' plot

ylims
  • limits for y axis (default is NULL)

facets
  • grid faceting formula (as an expresssion for multilevel faceting)

scales
  • ggplot2 scales option for facet_grid

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

Details

Uses extractMDFR.Data.FleetTimeSeriesABs() to extract the data (if objs is not a dataframe). Uses plotMDFR.Fits.TimeSeries() to make the plots, with plotObs=TRUE and plotMod=FALSE. Only time series with at least one non-zero value will be plotted (to eliminate lots of values along y=0).

Note that facets should be given as an expression, not as a character string, if you want multilevel faceting.

Value

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


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