From 880ec15297c81a0ecccf1267c6721f3cd70732f2 Mon Sep 17 00:00:00 2001 From: Schiano-NOAA Date: Wed, 25 Sep 2024 17:17:51 -0400 Subject: [PATCH] Update documentation for fxns and remove paths to data in landings fxn --- R/plot_landings.R | 7 ------- man/plot_recruitment.Rd | 19 +++++++++++++++++-- man/plot_spawning_biomass.Rd | 29 ++++++++++++++++++++--------- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/R/plot_landings.R b/R/plot_landings.R index 87f1203..2f32ccb 100644 --- a/R/plot_landings.R +++ b/R/plot_landings.R @@ -45,10 +45,3 @@ plot_landings <- function(dat, } -# Std framework examples -# SS3 -dat <- "C:/Users/samantha.schiano/Documents/Stock Assessment Workflow/test_ASAR/billfish_output.csv" -# BAM -#dat <- utils::read.csv("C:/Users/samantha.schiano/Documents/Stock Assessment Workflow/test_ASAR/blk_sea_bass_output.csv")[,-1] -dat <- "C:/Users/samantha.schiano/Documents/Stock Assessment Workflow/test_ASAR/black_sea_bass_output.csv" - diff --git a/man/plot_recruitment.Rd b/man/plot_recruitment.Rd index c0d62a6..da38a0b 100644 --- a/man/plot_recruitment.Rd +++ b/man/plot_recruitment.Rd @@ -6,11 +6,16 @@ \usage{ plot_recruitment( dat, - model, + model = "standard", params = FALSE, params_only = FALSE, units = c(sb = "metric tons", recruitment = "metric tons"), + recruitment_units = "metric tons", + spawning_biomass_units = "metric tons", + scaled = FALSE, + scale_amount = NULL, show_warnings = FALSE, + end_year = NULL, return = "recruitment" ) } @@ -30,9 +35,19 @@ are options for plotting spawning biomass.} or are different for SB and R, then report them here starting with SB units and following with R units.} +\item{recruitment_units}{units for recruitment} + +\item{spawning_biomass_units}{units of spawning biomass if different from biomass} + +\item{scaled}{T/F; indicate whether the output values for biomass and recruitment are scaled} + +\item{scale_amount}{indicate the exact amount of scale (i.e. 1000)} + \item{show_warnings}{Include warnings? Default FALSE} -\item{return}{Default returns recruitment over time. Options to display stock recruitment curve/recruitment fit} +\item{end_year}{last year of assessment} + +\item{return}{Default returns recruitment over time. Options to display recruitment time series, stock recruitment curve, or recruitment fit} } \value{ A series of plots are exported including recruitment over time with R0 diff --git a/man/plot_spawning_biomass.Rd b/man/plot_spawning_biomass.Rd index 20179b5..520ac0c 100644 --- a/man/plot_spawning_biomass.Rd +++ b/man/plot_spawning_biomass.Rd @@ -6,12 +6,16 @@ \usage{ plot_spawning_biomass( dat, - model = c("SS3", "BAM", "ASAP", "AMAK", "WHAM"), - refpts = FALSE, + model = c("SS3", "BAM", "ASAP", "AMAK", "WHAM", "standard"), show_warnings = FALSE, units = NULL, + biomass_units = NULL, + spawning_biomass_units = NULL, + scaled = FALSE, + scale_amount = 1000, ref_line = c("target", "MSY", "msy", "unfished"), - endyr = NULL + end_year = NULL, + relative = FALSE ) } \arguments{ @@ -22,25 +26,32 @@ other associated metrics.} Currently, only stock synthesis (SS3) and Beaufort Assessment Model (BAM) are options for plotting spawning biomass.} -\item{refpts}{Output a dataframe of reference points for spawning biomass -rather than plot. Default is FALSE.} - \item{show_warnings}{Option to suppress warnings} \item{units}{If units are not available in the output file or are not the default of metric tons, then state the units of spawning biomass applicable to the stock. For plotting purposes, spawning biomass is divided by 1000.} +\item{biomass_units}{units for biomass} + +\item{spawning_biomass_units}{units of spawning biomass if different from biomass} + +\item{scaled}{TRUE/FALSE; indicate whether the output values for biomass and recruitment are scaled} + +\item{scale_amount}{indicate the exact amount of scale (i.e. 1000)} + \item{ref_line}{choose with reference point to plot a reference line and use in relative sb calculations} -\item{endyr}{input the end year of the stock assessment data (not including -projections). This parameter will be depricated once the output converter is fully developed.} +\item{end_year}{input the end year of the stock assessment data (not including +projections). This parameter will be deprecated once the output converter is fully developed.} + +\item{relative}{Plot relative spawning biomass. Ref line indicates which reference point to use} } \value{ Plot spawning biomass from a stock assessment model as found in a NOAA stock assessment report. Units of spawning biomass can either be manually added -or will be extracted from the provided file if possible. +or will be extracted from the provided file if possible. In later releases, model will not } \description{ Plot Spawning Biomass