Export all figures and tables to Rda files within one function.
save_all_plots(
dat,
recruitment_unit_label = "mt",
recruitment_scale_amount = 1,
relative = FALSE,
proportional = TRUE,
interactive = FALSE,
figures_tables_dir = getwd(),
ref_line = "msy",
biomass_unit_label = "mt",
biomass_scale_amount = 1,
landings_unit_label = "mt",
spawning_biomass_label = "mt",
spawning_biomass_scale_amount = 1,
ref_line_sb = "msy",
abundance_at_age_scale_amount = 1,
abundance_at_age_unit_label = "fish",
biomass_at_age_scale_amount = 1,
biomass_at_age_unit_label = "mt",
index_unit_label = "",
bnc_unit_label = c(biomass = "mt", abundance = "fish", catch = "mt"),
catch_unit_label = "mt",
catch_scale_amount = 1,
projections_unit_label = c(catch = "mt", spawning_biomass = "mt", fishing_mortality =
"")
)Data frame or list. A tibble or named list of tibbles (input as list())
returned from convert_output.
If inputting a list of tibbles, the first tibble's reference point defined
in ref_line is used to plot a reference line or calculate relative spawning biomass.
String. Recruitment units
Default: "mt"
Number. A number describing how much to scale down the recruitment quantities shown on the y axis. For example, recruitment_scale_amount = 100 would scale down a value from 500,000 –> 5,000. This scale will be reflected in the y axis label.
Default: 1
Logical. TRUE/FALSE; specify whether to set y-axis values relative to the ref_line value.
Default: FALSE
Logical. TRUE/FALSE; scale size of bubble plots
Default: TRUE
Logical. TRUE/FALSE; indicate whether the environment is interactive.
Default: FALSE
Path. The location of the folder containing figures and tables ("figures" and "tables").
Default: the working directory (getwd())
String. Type of reference point to
compare biomass to. The default is "msy", which looks for
"biomass_msy" in the "label" column of dat. The actual
searching in dat is case agnostic and will work with either upper- or
lower-case letters but you must use one of the options specified in the
default list to ensure that the label on the figure looks correct
regardless of how it is specified in dat. Other possibilities may include
"target", "MSY", and "unfished". When the reference cannot be found,
indicate the reference line in the form c("label" = value).
Default: "msy"
Options: Including, but not limited to: "target", "MSY", "unfished"
String. Biomass units
Default: "mt"
Number. A number describing how much to scale down the
biomass quantities shown on the y axis. See recruitment_scale_amount.
Default: 1
String. Landings units
Default: "mt"
String. Spawning biomass units
Default: "mt"
Number. A number describing how much to scale down the
spawning biomass quantities shown on the y axis. See recruitment_scale_amount.
Default: 1
String. Same as ref_line, but this argument is
applied to plot_spawning_biomass.
Default: "msy"
Options: Including, but not limited to: "target", "MSY", "unfished"
Number. A number describing how much to scale down the
abundance quantities shown via bubble size. See recruitment_scale_amount.
Default: 1
String. Abbreviated abundance at age units
Default: "fish"
Number. A number describing how much to scale down the
biomass quantities shown via bubble size. See recruitment_scale_amount.
Default: 1
String. Abbreviated biomass at age units
Default: "mt"
String. Index of abundance/CPUE units
Default: ""
String. Abbreviated biomass, abundance, and catch units
Default: c("biomass" = "mt", "abundance" = "fish", "catch" = "mt")
String. Abbreviated catch units
Default: "mt"
Number. A number describing how much to scale down the
catch quantities shown via bubble size. See recruitment_scale_amount.
Default: 1
Units for projections quantities
Default: c("catch" = "mt", "spawning_biomass" = "mt", "fishing_mortality" = "")
Abbreviated uncertainty label for each quantity
Default: c("catch" = "stddev", "spawning_biomass" = "stddev", "fishing_mortality" = "stddev")
Rda files for each figure/table.
The input is from an assessment model output file translated to a standardized output (convert_output).
if (FALSE) { # \dontrun{
save_all_plots(dat,
ref_line = "unfished",
ref_line_sb = "target",
index_unit_label = "CPUE",
biomass_at_age_scale_amount = 1,
biomass_at_age_unit_label = "metric tons"
)
} # }