Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Remotes:
cran/assertive.types@master,
r4ss/r4ss@main,
ss3sim/ss3sim@main
Config/roxygen2/version: 8.0.0
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
Config/roxygen2/version: 8.0.0
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ importFrom(r4ss,SS_writedat)
importFrom(r4ss,SS_writeforecast)
importFrom(r4ss,SS_writestarter)
importFrom(ss3sim,get_results_all)
importFrom(ss3sim,get_results_iter)
importFrom(ss3sim,get_results_scenario)
importFrom(stats,na.omit)
importFrom(tidyr,gather)
Expand Down
5 changes: 2 additions & 3 deletions R/MS_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ get_no_EM_catch_df <- function(OM_dir, yrs, MS = "last_yr_catch") {
# TODO: figure out what values should go here; probably not 0.
Fcast_rec_line <- grep("^# Fcast_recruitments:$", par) + 1
par[Fcast_rec_line] <- paste0(rep(0, fore[["Nforecastyrs"]]), collapse = " ")
# # Forecast implementation error parameters were included in earlier SS3 version
# # Forecast implementation error parameters were included in earlier SS3 version
# # whether specified by the user or not. These changes are not needed in 3.30.24.
# Fcast_impl_err_line <- grep("^# Fcast_impl_error:$", par) + 1
# par[Fcast_impl_err_line] <- paste0(rep(0, fore[["Nforecastyrs"]]), collapse = " ")
Expand Down Expand Up @@ -622,7 +622,7 @@ Interim <- function(EM_out_dir = NULL, EM_init_dir = NULL,
temp_forecast[, 1] <- (Reference_dat[["endyr"]] + 1 - forecast_adjust):(Reference_dat[["endyr"]] + Reference_forecast[["Nforecastyrs"]])
colnames(temp_forecast) <- c("year", "recdev")
Reference_par[["recdev_forecast"]] <- as.data.frame(temp_forecast)
# # Forecast implementation error parameters were included in earlier SS3 version
# # Forecast implementation error parameters were included in earlier SS3 version
# # whether specified by the user or not. These changes are not needed in 3.30.24.
# temp_impl_error <- matrix(0, nrow = (Reference_forecast[["Nforecastyrs"]]), ncol = 2)
# temp_impl_error[, 1] <- (Reference_dat[["endyr"]] + 1):(Reference_dat[["endyr"]] + Reference_forecast[["Nforecastyrs"]])
Expand Down Expand Up @@ -839,7 +839,6 @@ Interim <- function(EM_out_dir = NULL, EM_init_dir = NULL,
)



if (!is.null(sample_struct)) {
sample_struct_sub <- lapply(sample_struct,
function(df, y) df[df[, 1] %in% y, ],
Expand Down
3 changes: 2 additions & 1 deletion R/develop_OMs.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ develop_OMs <- function(
} else {
recdev_name <- "recdev2"
}
new_parfile[[recdev_name]][, "recdev"] <- parfile[[recdev_name]][,
new_parfile[[recdev_name]][, "recdev"] <- parfile[[recdev_name]][
,
"recdev"
]

Expand Down
4 changes: 2 additions & 2 deletions R/develtools.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test_no_par <- function(orig_mod_dir, new_mod_dir) {
}

#' function for package developers to update SS3 input files
#'
#'
#' @param dir_models directory containing the model input files

update_ss3_version <- function(dir_models = "inst/extdata/models") {
Expand All @@ -88,7 +88,7 @@ update_ss3_version <- function(dir_models = "inst/extdata/models") {

# get current executable
dir_exe <- r4ss::get_ss3_exe(dir = tempdir())

# run with current SS3 version without estimation
for (i in 1:length(models)) {
r4ss::run(
Expand Down
1 change: 0 additions & 1 deletion R/initOM.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ create_OM <- function(OM_out_dir,
dat[["catch"]] <- new_catch



default_F <- F_list[["F_rate"]][F_list[["F_rate"]][, "year"] == dat[["endyr"]], c("year", "seas", "fleet", "F")]
new_F_rate <- rbind(F_list[["F_rate"]][, c("year", "seas", "fleet", "F")], F_list[["F_rate_fcast"]][, c("year", "seas", "fleet", "F")])
rownames(new_F_rate) <- c(F_list[["F_rate"]][, c("name")], F_list[["F_rate_fcast"]][, c("name")])
Expand Down
3 changes: 1 addition & 2 deletions R/single_extend_OM.R
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,7 @@ add_OM_devs <- function(ctl, dat, parlist, timeseries, future_om_dat) {
stop("Something is wrong, the number of temp selection parameters is not correct. This is likely a code bug not user error :(")
}

if ((tv_size_length + tv_age_length + tv_age_length) == 0) {
} else if (!is.null(ctl[["dirichlet_parms"]])) {
if ((tv_size_length + tv_age_length + tv_age_length) == 0) {} else if (!is.null(ctl[["dirichlet_parms"]])) {
insert_row <- which(names(ctl) == "dirichlet_parms")
} else if (!is.null(ctl[["age_selex_parms"]])) {
insert_row <- which(names(ctl) == "age_selex_parms")
Expand Down
2 changes: 0 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ clean_init_mod_files <- function(OM_out_dir, EM_out_dir = NULL, MS = "EM",
endyr <- OM_dat[["endyr"]]




# get years in range function
get_yrs_in_range <- function(list_name, dat, styr, endyr) {
df <- dat[[list_name]]
Expand Down
2 changes: 1 addition & 1 deletion man/get_F.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions man/get_data_file.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions man/get_ss_par_file.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/run_OM.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tests/testthat/test-future_om.R
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ test_that("Tests a model with env link using historical values", {
})



test_that("Setting seeds works as intended", {
# check replicate option works
ext_files <- system.file(package = "SSMSE")
Expand Down