diff --git a/DESCRIPTION b/DESCRIPTION index 0610c44..fbc0625 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -20,11 +20,12 @@ Depends: R (>= 3.5) Imports: dplyr, + gh, gplots, lifecycle, magrittr, mvtnorm, - r4ss (>= 1.46.1), + r4ss (== 1.49.3), randtests, reshape2, rlang @@ -34,9 +35,9 @@ Suggests: rmarkdown, testthat (>= 3.0.0) Remotes: - r4ss/r4ss@main + r4ss/r4ss@v1.49.3 Encoding: UTF-8 LazyData: True LazyDataCompression: gzip Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 diff --git a/NAMESPACE b/NAMESPACE index 4d38614..7229aa2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -19,7 +19,9 @@ export(SSretroComps) export(SSrmse) export(SSrunstest) export(SSsettingsBratioF) +export(get_ss3_exe) export(ssruns_sig3) +import(gh) importFrom(gplots,ci2d) importFrom(grDevices,adjustcolor) importFrom(grDevices,dev.new) diff --git a/R/SSdeltaMVLN_old.R b/R/SSdeltaMVLN_old.R index 9f45166..11b25c9 100644 --- a/R/SSdeltaMVLN_old.R +++ b/R/SSdeltaMVLN_old.R @@ -3,7 +3,7 @@ #' A function to generate kobe pdfs from a Multivariate Log-Normal Distribution including plotting option. This version is used for older versions of Stock Synthesis. For newer versions (v3.24 and newer), use SSdeltaMVLN(). #' #' -#' @param ss3rep from r4ss::SSgetoutput()$replist1 +#' @param ss3rep from r4ss::SSgetoutput()[["replist1"]] #' @param status covarying stock status quantaties to extract from Hessian #' @param quants additional stock quantaties to extract from Hessian #' @param Fref Choice of reference point for stock SSB/XFref=c("MSY","Ftrg"),only if F_report_basis: 0 or 3 diff --git a/R/SSkobe.R b/R/SSkobe.R index 44d9594..4226182 100644 --- a/R/SSkobe.R +++ b/R/SSkobe.R @@ -2,7 +2,7 @@ #' #' Generates a Kobe plot or phase plot illustrating the stock status uncertainty over SSB/SSBmsy and F/Fmsy #' -#' @param kb output from SSdeltaMVLN()$kb +#' @param kb output from SSdeltaMVLN()[["kb"]] #' @param joint option FALSE shows individual runs #' @param year option to choose year for kobe, last year is default #' @param posterior visualization of posterior c("points","kernel") diff --git a/R/SSplotEnsemble.R b/R/SSplotEnsemble.R index 4468bc7..dfb0f23 100644 --- a/R/SSplotEnsemble.R +++ b/R/SSplotEnsemble.R @@ -236,8 +236,8 @@ SSplotEnsemble <- function(kb, n.quantiles <- length(quantiles) for (i in 1:n.quantiles) { exp[[i]] <- aggregate(y ~ year + run, kb, mean) - exp[[i]][["lower"]] <- aggregate(y ~ year + run, kb, quantile, quantiles[[i]][1])$y - exp[[i]][["upper"]] <- aggregate(y ~ year + run, kb, quantile, quantiles[[i]][2])$y + exp[[i]][["lower"]] <- aggregate(y ~ year + run, kb, quantile, quantiles[[i]][1])[["y"]] + exp[[i]][["upper"]] <- aggregate(y ~ year + run, kb, quantile, quantiles[[i]][2])[["y"]] } @@ -444,7 +444,7 @@ ensemble_plot_index <- function(summaryoutput, # legendloc <- "topleft" # } # if (is.numeric(legendloc)) { - # Usr <- par()$usr + # Usr <- par()[["usr"]] # legendloc <- list( # x = Usr[1] + legendloc[1] * (Usr[2] - Usr[1]), # y = Usr[3] + legendloc[2] * (Usr[4] - Usr[3]) diff --git a/R/SSplotHCxval.R b/R/SSplotHCxval.R index 683e10f..1f15132 100644 --- a/R/SSplotHCxval.R +++ b/R/SSplotHCxval.R @@ -247,7 +247,7 @@ SSplotHCxval <- function(retroSummary, # legendloc <- "topleft" # } # if (is.numeric(legendloc)) { - # Usr <- par()$usr + # Usr <- par()[["usr"]] # legendloc <- list( # x = Usr[1] + legendloc[1] * (Usr[2] - Usr[1]), # y = Usr[3] + legendloc[2] * (Usr[4] - Usr[3]) @@ -613,7 +613,7 @@ SSplotHCxval <- function(retroSummary, filenameprefix = filenameprefix ) par(par) - get_mase <- plot_hcxval(indexfleets)$MASE + get_mase <- plot_hcxval(indexfleets)[["MASE"]] dev.off() MASE <- rbind(MASE, get_mase) } # End of Fleet Loop @@ -626,7 +626,7 @@ SSplotHCxval <- function(retroSummary, if (fi %in% legendindex) legend <- TRUE indexfleets <- unique(hcruns[["indices"]][["Fleet"]])[fi] if (!add) (par) - get_mase <- plot_hcxval(indexfleets)$MASE + get_mase <- plot_hcxval(indexfleets)[["MASE"]] MASE <- rbind(MASE, get_mase) } # End of Fleet Loop } diff --git a/R/SSplotModelcomp.R b/R/SSplotModelcomp.R index 9c21e18..9d623ce 100644 --- a/R/SSplotModelcomp.R +++ b/R/SSplotModelcomp.R @@ -231,7 +231,7 @@ SSplotModelcomp <- function(summaryoutput, # legendloc <- "topleft" # } # if (is.numeric(legendloc)) { - # Usr <- par()$usr + # Usr <- par()[["usr"]] # legendloc <- list( # x = Usr[1] + legendloc[1] * (Usr[2] - Usr[1]), # y = Usr[3] + legendloc[2] * (Usr[4] - Usr[3]) @@ -510,7 +510,7 @@ SSplotModelcomp <- function(summaryoutput, # legendloc <- "topleft" # } # if (is.numeric(legendloc)) { - # Usr <- par()$usr + # Usr <- par()[["usr"]] # legendloc <- list( # x = Usr[1] + legendloc[1] * (Usr[2] - Usr[1]), # y = Usr[3] + legendloc[2] * (Usr[4] - Usr[3]) diff --git a/R/SSplotRetro.R b/R/SSplotRetro.R index a53ef91..6499cd3 100644 --- a/R/SSplotRetro.R +++ b/R/SSplotRetro.R @@ -187,7 +187,7 @@ SSplotRetro <- function(summaryoutput, # legendloc <- "topleft" # } # if (is.numeric(legendloc)) { - # Usr <- par()$usr + # Usr <- par()[["usr"]] # legendloc <- list( # x = Usr[1] + legendloc[1] * (Usr[2] - Usr[1]), # y = Usr[3] + legendloc[2] * (Usr[4] - Usr[3]) diff --git a/R/SSplotRunstest.R b/R/SSplotRunstest.R index 3af4c1e..4a53404 100644 --- a/R/SSplotRunstest.R +++ b/R/SSplotRunstest.R @@ -198,7 +198,7 @@ SSplotRunstest <- function(ss3rep, } if (subplots == "len" | subplots == "age" | subplots == "size") { - comps <- SScompsTA1.8(ss3rep, fleet = NULL, type = subplots, plotit = FALSE)$runs_dat + comps <- SScompsTA1.8(ss3rep, fleet = NULL, type = subplots, plotit = FALSE)[["runs_dat"]] comps[["residuals"]] <- ifelse(is.na(comps[["Obs"]]), NA, log(comps[["Obs"]]) - log(comps[["Exp"]])) if (is.null(comps[["Fleet_name"]])) { # Deal with Version control comps[["Fleet_name"]] <- comps[["Name"]] @@ -207,7 +207,7 @@ SSplotRunstest <- function(ss3rep, } if (subplots == "con") { - cond <- SScompsTA1.8(ss3rep, fleet = NULL, type = subplots, plotit = FALSE)$runs_dat + cond <- SScompsTA1.8(ss3rep, fleet = NULL, type = subplots, plotit = FALSE)[["runs_dat"]] cond[["residuals"]] <- ifelse(is.na(cond[["Obs"]]), NA, log(cond[["Obs"]]) - log(cond[["Exp"]])) if (is.null(cond[["Fleet_name"]])) { # Deal with Version control cond[["Fleet_name"]] <- cond[["Name"]] @@ -444,7 +444,7 @@ SSrunstest <- function(ss3rep, } if (subplots == "len" | subplots == "age") { - comps <- SScompsTA1.8(ss3rep, fleet = NULL, type = subplots, plotit = FALSE)$runs_dat + comps <- SScompsTA1.8(ss3rep, fleet = NULL, type = subplots, plotit = FALSE)[["runs_dat"]] comps[["residuals"]] <- ifelse(is.na(comps[["Obs"]]), NA, log(comps[["Obs"]]) - log(comps[["Exp"]])) if (is.null(comps[["Fleet_name"]])) { # Deal with Version control comps[["Fleet_name"]] <- comps[["Name"]] @@ -453,7 +453,7 @@ SSrunstest <- function(ss3rep, } if (subplots == "con") { - cond <- SScompsTA1.8(ss3rep, fleet = NULL, type = subplots, plotit = FALSE)$runs_dat + cond <- SScompsTA1.8(ss3rep, fleet = NULL, type = subplots, plotit = FALSE)[["runs_dat"]] cond[["residuals"]] <- ifelse(is.na(cond[["Obs"]]), NA, log(cond[["Obs"]]) - log(cond[["Exp"]])) if (is.null(cond[["Fleet_name"]])) { # Deal with Version control cond[["Fleet_name"]] <- cond[["Name"]] diff --git a/R/SSretroComps.R b/R/SSretroComps.R index 6ae32c5..99bc1ee 100644 --- a/R/SSretroComps.R +++ b/R/SSretroComps.R @@ -30,7 +30,7 @@ SSretroComps <- function(retroModels) { rep.temp <- retroModels[[paste(replist[i])]] rep.temp[["lendbase"]] <- rbind(rep.temp[["ghostlendbase"]], rep.temp[["lendbase"]][, 1:ncol(rep.temp[["ghostlendbase"]])]) rep.temp[["lendbase"]] <- data.frame(rep.temp[["lendbase"]], imodel = i) - lencomps <- rbind(lencomps, data.frame(SScompsTA1.8(rep.temp, type = "len", plotit = F)$runs_dat, imodel = i)) + lencomps <- rbind(lencomps, data.frame(SScompsTA1.8(rep.temp, type = "len", plotit = F)[["runs_dat"]], imodel = i)) } lencomps <- lencomps[order(lencomps[["imodel"]], lencomps[["Fleet"]], lencomps[["Time"]]), ] @@ -42,7 +42,7 @@ SSretroComps <- function(retroModels) { for (i in 1:length(replist)) { rep.temp <- retroModels[[paste(replist[i])]] rep.temp[["agedbase"]] <- rbind(rep.temp[["ghostagedbase"]], rep.temp[["agedbase"]][, 1:ncol(rep.temp[["ghostagedbase"]])]) - agecomps <- rbind(agecomps, data.frame(SScompsTA1.8(rep.temp, type = "age", plotit = F)$runs_dat, imodel = i)) + agecomps <- rbind(agecomps, data.frame(SScompsTA1.8(rep.temp, type = "age", plotit = F)[["runs_dat"]], imodel = i)) } agecomps <- agecomps[order(agecomps[["imodel"]], agecomps[["Fleet"]], agecomps[["Time"]]), ] hccomps[["age"]] <- agecomps @@ -53,7 +53,7 @@ SSretroComps <- function(retroModels) { for (i in 1:length(replist)) { rep.temp <- retroModels[[paste(replist[i])]] rep.temp[["condbase"]] <- rbind(rep.temp[["ghostcondbase"]], rep.temp[["condbase"]][, 1:ncol(rep.temp[["ghostcondbase"]])]) - concomps <- rbind(concomps, data.frame(SScompsTA1.8(rep.temp, type = "con", plotit = F)$runs_dat, imodel = i)) + concomps <- rbind(concomps, data.frame(SScompsTA1.8(rep.temp, type = "con", plotit = F)[["runs_dat"]], imodel = i)) } concomps <- concomps[order(concomps[["imodel"]], concomps[["Fleet"]], concomps[["Time"]]), ] hccomps[["con"]] <- concomps diff --git a/R/SSrmse.R b/R/SSrmse.R index 91295ef..59bb112 100644 --- a/R/SSrmse.R +++ b/R/SSrmse.R @@ -36,7 +36,7 @@ SSrmse <- function(ss3rep, quants = c("cpue", "len", "age", "con"), seas = NULL, } if (quants == "len" | quants == "age" | quants == "size") { - comps <- SScompsTA1.8(ss3rep, fleet = NULL, type = quants, plotit = FALSE)$runs_dat + comps <- SScompsTA1.8(ss3rep, fleet = NULL, type = quants, plotit = FALSE)[["runs_dat"]] comps[["residuals"]] <- ifelse(is.na(comps[["Obs"]]), NA, log(comps[["Obs"]]) - log(comps[["Exp"]])) if (is.null(comps[["Fleet_name"]])) { # Deal with Version control comps[["Fleet_name"]] <- comps[["Name"]] @@ -45,7 +45,7 @@ SSrmse <- function(ss3rep, quants = c("cpue", "len", "age", "con"), seas = NULL, } if (quants == "con") { - cond <- SScompsTA1.8(ss3rep, fleet = NULL, type = quants, plotit = FALSE)$runs_dat + cond <- SScompsTA1.8(ss3rep, fleet = NULL, type = quants, plotit = FALSE)[["runs_dat"]] cond[["residuals"]] <- ifelse(is.na(cond[["Obs"]]), NA, log(cond[["Obs"]]) - log(cond[["Exp"]])) if (is.null(cond[["Fleet_name"]])) { # Deal with Version control cond[["Fleet_name"]] <- cond[["Name"]] diff --git a/R/get_ss3_exe.R b/R/get_ss3_exe.R new file mode 100644 index 0000000..bfe19a0 --- /dev/null +++ b/R/get_ss3_exe.R @@ -0,0 +1,211 @@ +#' Download the Stock Synthesis (SS3) executable +#' +#' Downloads the SS3 executable according to specified version and the user +#' operating system. +#' +#' @param dir The directory that you would like the executable downloaded to. +#' @param version A character string of the executable version tag to download +#' (e.g.'v3.30.20' or 'v3.30.18'). A list of tags is available at +#' https://github.com/nmfs-ost/ss3-source-code/tags +#' @return A string of the file path to the downloaded executable +#' @author Elizabeth F. Gugliotti +#' @export +#' @import gh +#' @examples +#' \dontrun{ +#' get_ss3_exe() +#' get_ss3_exe(version = "v3.30.18") +#' } +#' @description The `get_ss3_exe()` function uses the `gh` package to get either +#' the latest release (if version = NULL) or the specified version of the Stock +#' Synthesis executable for the appropriate operating system to the directory `dir` +#' (if dir = NULL, then the executable is downloaded to the working directory). +#' To view the version tags available go to +#' https://github.com/nmfs-ost/ss3-source-code/tags + +get_ss3_exe <- function(dir = NULL, version = NULL) { + # Get latest release if version not specified + if (is.null(version)) { + latest_release <- gh::gh("GET /repos/nmfs-ost/ss3-source-code/releases/latest", page = 1, .token = NA_character_) + tag <- latest_release[["tag_name"]] + } else { + # Otherwise get specified version + all_tags <- gh::gh("GET /repos/nmfs-ost/ss3-source-code/tags", .token = NA_character_) + df_tags <- as.data.frame(do.call(rbind, all_tags)) + tags <- unlist(df_tags[["name"]]) + + if (!version %in% tags) { + warning("The version tag that you entered is invalid or not in the right format, + please go to https://github.com/nmfs-ost/ss3-source-code/tags + to get a correct version tag or version tag format") + } else { + tag <- version + } + } + + if (is.null(dir)) { + dir <- getwd() + message("No directory provided, the executable will be downloaded to the working directory") + } + + if (!dir.exists(dir)) { + stop("Directory doesn't exist: ", dir) + } + + # if (.Platform[["OS.type"]] == "windows") { + if (R.version[["os"]] == "mingw32") { + download_location <- ss3_exe_windows(dir, tag) + } else if (substr(R.version[["os"]], 1, 6) == "darwin") { + download_location <- ss3_exe_darwin(dir, tag, R.version[["arch"]]) + } else if (R.version[["os"]] == "linux-gnu") { + download_location <- ss3_exe_linux(dir, tag) + } else { + stop("The Stock Synthesis executable is not available for ", R.version[["os"]], ".") # nocov end + } + + return(invisible(download_location)) +} + + + + +#' @rdname get_ss3_exe +#' +#' @param dir Target Directory +#' @param tag Target ss3 Version release +#' +#' @return A string of the file path to the downloaded executable +#' +#' @keywords internal +#' +ss3_exe_windows <- function(dir, tag) { + if (.Platform[["r_arch"]] == "x32") { # nocov start + warning( + "Stock Synthesis binary is not available for 32-bit ", + .Platform[["OS.type"]], "." + ) + } else { + url <- paste0( + "https://github.com/nmfs-ost/ss3-source-code/releases/download/", + tag, "/ss3_win.exe" + ) + try_ss <- tryCatch( + suppressWarnings(utils::download.file(url, destfile = file.path(dir, "ss3.exe"), mode = "wb")), + error = function(e) "ss3 name not right for this version, trying ss" + ) + + if (try_ss == "ss3 name not right for this version, trying ss") { + url <- paste0( + "https://github.com/nmfs-ost/ss3-source-code/releases/download/", + tag, "/ss_win.exe" + ) + utils::download.file(url, destfile = file.path(dir, "ss3.exe"), mode = "wb") + } + download_location <- file.path(dir, "ss3.exe") + message(paste0( + "The stock synthesis executable for Windows ", tag, " was downloaded to: ", + download_location + )) + + return(invisible(download_location)) + } +} + + +#' @rdname get_ss3_exe +#' +#' @param dir Target Directory +#' @param tag Target ss3 Version release +#' @param arch arch +#' +#' @return A string of the file path to the downloaded executable +#' +#' @keywords internal +#' +ss3_exe_darwin <- function(dir, tag, arch = c("aarch64", "x86_64")) { + arch <- match.arg(arch) + + if (arch == "aarch64") { + url <- paste0( + "https://github.com/nmfs-ost/ss3-source-code/releases/download/", + tag, "/ss3_osx_arm64" + ) + try_arm64 <- tryCatch( + suppressWarnings(utils::download.file(url, destfile = file.path(dir, "ss3"), mode = "wb")), + error = function(e) "ss3 executable not available for macOS arm64 architecture + computers for versions prior to v.3.30.22.1" + ) + + if (try_arm64 == "ss3 executable not available for macOS arm64 architecture computers for + versions prior to v.3.30.22.1") { + print(try_arm64) + } else { + Sys.chmod(paths = file.path(dir, "ss3"), mode = "0700") + download_location <- file.path(dir, "ss3") + message(paste0( + "The stock synthesis executable for Mac ", tag, " was downloaded to: ", + download_location + )) + } + } else if (arch == "x86_64") { + url <- paste0( + "https://github.com/nmfs-ost/ss3-source-code/releases/download/", + tag, "/ss3_osx" + ) + try_ss <- tryCatch( + suppressWarnings(utils::download.file(url, destfile = file.path(dir, "ss3"), mode = "wb")), + error = function(e) "ss3 name not right for this version, trying ss" + ) + + if (try_ss == "ss3 name not right for this version, trying ss") { + url <- paste0( + "https://github.com/nmfs-ost/ss3-source-code/releases/download/", + tag, "/ss_osx" + ) + utils::download.file(url, destfile = file.path(dir, "ss3"), mode = "wb") + } + Sys.chmod(paths = file.path(dir, "ss3"), mode = "0700") + download_location <- file.path(dir, "ss3") + message(paste0( + "The stock synthesis executable for Mac ", tag, " was downloaded to: ", + download_location + )) + } + return(invisible(download_location)) +} + +#' @rdname get_ss3_exe +#' +#' @param dir Target Directory +#' @param tag Target ss3 Version release +#' +#' @return A string of the file path to the downloaded executable +#' +#' @keywords internal +#' +ss3_exe_linux <- function(dir, tag) { + url <- paste0( + "https://github.com/nmfs-ost/ss3-source-code/releases/download/", + tag, "/ss3_linux" + ) + try_ss <- tryCatch( + suppressWarnings(utils::download.file(url, destfile = file.path(dir, "ss3"), mode = "wb")), + error = function(e) "ss3 name not right for this version, trying ss" + ) + + if (try_ss == "ss3 name not right for this version, trying ss") { + url <- paste0( + "https://github.com/nmfs-ost/ss3-source-code/releases/download/", + tag, "/ss_linux" + ) + utils::download.file(url, destfile = file.path(dir, "ss3"), mode = "wb") + } + Sys.chmod(paths = file.path(dir, "ss3"), mode = "0700") + Sys.chmod(paths = dir, mode = "0777") + download_location <- file.path(dir, "ss3") + message(paste0( + "The stock synthesis executable for Linux ", tag, " was downloaded to: ", + download_location + )) + return(invisible(download_location)) +} diff --git a/man/SSdeltaMVLN_old.Rd b/man/SSdeltaMVLN_old.Rd index b317caa..c216b8c 100644 --- a/man/SSdeltaMVLN_old.Rd +++ b/man/SSdeltaMVLN_old.Rd @@ -22,7 +22,7 @@ SSdeltaMVLN_old( ) } \arguments{ -\item{ss3rep}{from r4ss::SSgetoutput()$replist1} +\item{ss3rep}{from r4ss::SSgetoutput()[\link{"replist1"}]} \item{status}{covarying stock status quantaties to extract from Hessian} diff --git a/man/SSplotKobe.Rd b/man/SSplotKobe.Rd index 6d95b3f..4c9d2af 100644 --- a/man/SSplotKobe.Rd +++ b/man/SSplotKobe.Rd @@ -25,7 +25,7 @@ SSplotKobe( ) } \arguments{ -\item{kb}{output from SSdeltaMVLN()$kb} +\item{kb}{output from SSdeltaMVLN()[\link{"kb"}]} \item{joint}{option FALSE shows individual runs} diff --git a/man/get_ss3_exe.Rd b/man/get_ss3_exe.Rd new file mode 100644 index 0000000..1bbecad --- /dev/null +++ b/man/get_ss3_exe.Rd @@ -0,0 +1,59 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_ss3_exe.R +\name{get_ss3_exe} +\alias{get_ss3_exe} +\alias{ss3_exe_windows} +\alias{ss3_exe_darwin} +\alias{ss3_exe_linux} +\title{Download the Stock Synthesis (SS3) executable} +\usage{ +get_ss3_exe(dir = NULL, version = NULL) + +ss3_exe_windows(dir, tag) + +ss3_exe_darwin(dir, tag, arch = c("aarch64", "x86_64")) + +ss3_exe_linux(dir, tag) +} +\arguments{ +\item{dir}{Target Directory} + +\item{version}{A character string of the executable version tag to download +(e.g.'v3.30.20' or 'v3.30.18'). A list of tags is available at +https://github.com/nmfs-ost/ss3-source-code/tags} + +\item{tag}{Target ss3 Version release} + +\item{arch}{arch} +} +\value{ +A string of the file path to the downloaded executable + +A string of the file path to the downloaded executable + +A string of the file path to the downloaded executable + +A string of the file path to the downloaded executable +} +\description{ +The \code{get_ss3_exe()} function uses the \code{gh} package to get either +the latest release (if version = NULL) or the specified version of the Stock +Synthesis executable for the appropriate operating system to the directory \code{dir} +(if dir = NULL, then the executable is downloaded to the working directory). +To view the version tags available go to +https://github.com/nmfs-ost/ss3-source-code/tags +} +\details{ +Downloads the SS3 executable according to specified version and the user +operating system. +} +\examples{ +\dontrun{ +get_ss3_exe() +get_ss3_exe(version = "v3.30.18") +} +} +\author{ +Elizabeth F. Gugliotti +} +\keyword{internal} diff --git a/tests/testthat.R b/tests/testthat.R index 905f637..7d1ebea 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -7,7 +7,8 @@ files_path <- system.file("extdata", package = "ss3diags") run_tmp <- file.path(tempdir(check = TRUE), "test-runs") dir.create(run_tmp, showWarnings = FALSE) file.copy(from = list.files(files_path, full.names = TRUE), to = run_tmp) -r4ss::get_ss3_exe(dir = run_tmp, version = "v3.30.21") +# r4ss::get_ss3_exe(dir = run_tmp, version = "v3.30.21") +ss3diags::get_ss3_exe(dir = run_tmp, version = "v3.30.21") ## Run retrospectives if (file.exists(file.path(run_tmp, "ss3")) | file.exists(file.path(run_tmp, "ss3.exe"))) { r4ss::retro(dir = run_tmp, oldsubdir = "", newsubdir = "retrospectives", years = 0:-3, show_in_console = FALSE)