library(r4ss)
library(dplyr)
library(stringr)
library(magrittr)
library(ggplot2)
<- this.path::this.proj()
main_dir
<- SS_output(dir = file.path(main_dir, "stock-synthesis-models", params$model_dir), verbose=FALSE, printstats=FALSE)
report <- report$parameters %>%
new_steep filter(str_detect(Label, "SR_BH_steep")) %>% ## Need to change this to match the parameter name in control file
pull(Value)
Report template
Model modification description
I changed the steepness to 0.7.
Plot of SSB
Here is a plot showing the timeseries of SSB for the modified model.
Code
<- report$timeseries %>%
ssb_summary select(Yr, SpawnBio) %>%
mutate(model_name = params$model_dir)
%>%
ssb_summary ggplot() +
geom_line(aes(x = Yr, y = SpawnBio)) +
xlab("Year") +
ylab("Spawning Biomass") +
theme(panel.background = element_rect(fill = "white", color = "black", linetype = "solid"),
panel.grid.major = element_line(color = 'gray70',linetype = "dotted"),
panel.grid.minor = element_line(color = 'gray70',linetype = "dotted"),
strip.background =element_rect(fill="white"),
legend.key = element_rect(fill = "white"))