From 67fe26821782f16f5fe1a0ec96ff6cb1c5c4cf8b Mon Sep 17 00:00:00 2001 From: Jim Ianelli Date: Tue, 6 Aug 2024 12:51:09 -0700 Subject: [PATCH] put in some mods to vignette --- vignettes/00-spm-example.Rmd | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/vignettes/00-spm-example.Rmd b/vignettes/00-spm-example.Rmd index 0c0f1be..1fd7c72 100644 --- a/vignettes/00-spm-example.Rmd +++ b/vignettes/00-spm-example.Rmd @@ -94,9 +94,7 @@ inp <- spmR::dat2list(here::here("examples","BSAI NRS","spm.dat")) fc <- data.frame(Year=inp$fixed_catch[,1], mean=inp$fixed_catch[,2], type='C')# |> names(fc) <- c("Year", "mean", "type") fc <- fc |> expand_grid(Alt=c(1,3,5,7)) |> mutate(Alt=as.factor(Alt), ub=mean,lb=mean) -fc -p1$data -p1 + geom_point(data=fc,aes(x=Year,y=mean)) +plotSPM(df) + geom_point(data=fc,aes(x=Year,y=mean)) #p1$data ``` @@ -131,11 +129,10 @@ plotSPM(df) First we'll run this model with only 3-years fixed catch assumed -```{r goa_fhs,eval=TRUE,echo=FALSE} -# df <- runSPM(here::here("examples","goa_flathead/maia"),run=TRUE) +```{r goa_fhs,eval=TRUE,echo=TRUE} inp <- spmR::dat2list(here::here("examples","goa_flathead","spmorig.dat")) spmR::list2dat(inp,here::here("examples","goa_flathead","spm.dat")) -bdf <- runSPM(here::here("examples","goa_flathead"),run=TRUE) +bdf <- runSPM(here::here("examples","goa_flathead"),run=FALSE) df <- readr::read_csv(here::here("examples","goa_flathead","spm_summary.csv")) plotSPM(df) # p1<- plotSPM(df) @@ -151,7 +148,7 @@ inp$nyrs_fixed_catch <- 5 inp$fixed_catch <- rbind(inp$fixed_catch, c(2025, 1100), c(2026, 1100)) inp$fixed_catch spmR::list2dat(inp,here::here("examples","goa_flathead","spm.dat")) -bdf <- runSPM(here::here("examples","goa_flathead"),run=TRUE) +bdf <- runSPM(here::here("examples","goa_flathead"),run=FALSE) df <- readr::read_csv(here::here("examples","goa_flathead","spm_summary.csv")) plotSPM(df)