plot_ss: Plot index from SS table

View source: R/plot_ss.R

plot_ssR Documentation

Plot index from SS table

Description

Plot a single time series of estimated index values for the US West Coast using data in a "Table_for_SS3.csv" file.

Usage

plot_ss(
  file.in = "Table_for_SS3.csv",
  savefile,
  lab.survey = "survey ",
  lab.spp = "",
  do.smooth = TRUE
)

Arguments

file.in

A file path pointing to the "Table_for_SS3.csv" file that has the results you wish to plot. The path can be relative or absolute. This file is generated while running VAST_condition().

savefile

The file name that you want the results saved to. A full path can be specified, else the file will be saved in the current directory.

lab.survey

A character entry specifying the name of the survey that gathered the data. This can be text of your choice or a single word used to represent the survey name as defined in the first column of createMatrix(). See GetSurveyAbb.fn() for how this shortened name is linked to a longer abbreviation. Either the results of this function based on your input or your direct input if no match is found will be used as text on the plot or in the resulting caption. The default is the word "survey" which will fit the bill for a generic specification.

lab.spp

A character string that will be pasted after the survey name for the main title for the figure. Typically, this is the species name. Scientific names can be passed using lab.spp = expression(italic("xxx")) or lab.spp = bquote(italic(.(xxx))) if you want to evaluate the object xxx.

do.smooth

A logical value specifying whether or not a smoother should be added for the first strata, which is typically the strata that includes all areas.

Value

A 10 by 7 inch png is saved to the disk showing a time series of the estimated index of abundance from a single model run. If there are more than one strata, all strata are plotted, but the summary strata is always plotted in black and will be the only line with confidence intervals. Estimates are in metric tonnes, as labeled. Years with estimates of zero are excluded from the figure. A caption with a Latex label is also written to a csv file, where the first column is the label and the second column is the caption.

Author(s)

Chantel Wetzel


nwfsc-assess/VAST_WestCoast documentation built on July 4, 2023, 5:45 p.m.