setup_mse_plot_objects: Setup MSE plot data frames, colors, and plot names

View source: R/setup_mse_plot_objects.R

setup_mse_plot_objectsR Documentation

Setup MSE plot data frames, colors, and plot names

Description

Setup MSE plot data frames, colors, and plot names

Usage

setup_mse_plot_objects(
  results_dir = NULL,
  plotnames = NULL,
  porder = NULL,
  quants = c(0.025, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.975),
  om_only = FALSE,
  ...
)

Arguments

results_dir

A directory name where results from run_mses() resides. Only files in this directory that end in '.rds' and contain 'MSE' will be loaded

plotnames

Names for the plots

porder

Order of the scenarios in the figures. Default is the order they appear in the results_dir directory. All outputs will be ordered in this way

quants

Quantiles to use

om_only

If TRUE, this was an OM-only MSE run. If FALSE, the full MSE was run including estimation model

...

Arguments to be passed to merge_run_data() and calc_standard_error_ssb()

Details

Reads in the .rds files found in the results_dir directory and creates two indicator data.frames and colors for plotting

Value

A list of length 10: The items are (1) A data.frame containing the SSB/AAV/Catch indicators, (2) A data.frame containing the country and season indicators, (3) A data.frame containing the violin indicators (data in format for violin plots), (4) A data.frame of data to be used to create violin plots, (5) A vector of colors, one for each file loaded (scenario), (6) A vector of plot names, one for each scenario, (7) merged_run_data which is a list, one for each scenario, and each containing a list of length 3, which is the output of merge_run_data(), (8) A list of data frames, which are the scenario-aggregated data frames from mse_out_data[[N]][[3]], (9) A list of length = number of scenarios, containing three-column data.frames with run, SE.SSB, and year as columns/ SE.SSB is the standard error between the OM and EM, (10) sim_data - output from the function run_om() (the operating model output)


pacific-hake/pacifichakemse documentation built on June 11, 2024, 4:07 a.m.