From 993f1a198e2dcf0eba734ddba8f7f81704b83218 Mon Sep 17 00:00:00 2001 From: MOshima-PIFSC Date: Tue, 6 Feb 2024 11:54:32 -1000 Subject: [PATCH] fix in jitter file names --- vignettes/articles/Jitter.Rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vignettes/articles/Jitter.Rmd b/vignettes/articles/Jitter.Rmd index 4595a68..ccc2d62 100644 --- a/vignettes/articles/Jitter.Rmd +++ b/vignettes/articles/Jitter.Rmd @@ -51,7 +51,7 @@ r4ss::run(dir = dir_jitter, exe = "ss3", verbose = FALSE) For this example, we will run 50 jitters. The `jitter()` function automates the entire process so you only need to give it a few arguments and it will run and produce the total likelihoods for each run. Full documentation of the `jitter()` function can be found at the [r4ss website](https://r4ss.github.io/r4ss/reference/jitter.html). ```{r run-jitter} -Njitter <- 50 +Njitter <- 5 jit.likes <- r4ss::jitter(dir = dir_jitter, Njitter = Njitter, init_values_src = 1, @@ -64,7 +64,7 @@ jit.likes <- r4ss::jitter(dir = dir_jitter, To analyze the output of all 50 runs, use `r4ss::SSgetoutput()` and `r4ss::SSsummarize()` as shown below. ```{r } -jit_mods <- SSgetoutput(keyvec = c("",1:Njitter), #"" to include reference run (Report.sso) +jit_mods <- SSgetoutput(keyvec = 0:Njitter, #"" to include reference run (Report.sso) getcomp = FALSE, dirvec = dir_jitter, getcovar = FALSE, @@ -87,7 +87,7 @@ converged_grad <- which(jit_summary$maxgrad < 0.0001) converged_ssb <- jit_summary$SpawnBio %>% mutate(across(c(1:(Njitter+1)), - .fns = ~./replist)) %>% # for each column, divide SSB by SSB from the reference run (replist) + .fns = ~./replist0)) %>% # for each column, divide SSB by SSB from the reference run (replist) select(-Label) %>% pivot_longer(col = c(1:(Njitter+1)), names_to = "jitter", values_to = "SSB") %>% pivot_wider(names_from = Yr, values_from = SSB) %>%