set_dirs: Set and return all model directories for the project

View source: R/utils-set-dirs.R

set_dirsR Documentation

Set and return all model directories for the project

Description

Set and return all model directories for the project

Usage

set_dirs(
  models_dir = NA,
  last_yr_models_dir = NA,
  base_models_dir = "01-base-models",
  bridge_models_dir = "02-bridging-models",
  sens_models_dir = "03-sensitivity-models",
  request_models_dir = "04-request-models",
  test_models_dir = "05-test-models",
  base_models_dirs = NA,
  bridge_models_dirs = NA,
  sens_models_dirs = NA,
  request_models_dirs = NA,
  test_models_dirs = NA,
  prepend_to_bridge = NA,
  suppress_warnings = FALSE
)

Arguments

models_dir

Full path in which the SS3 model directories are located for the current assessment year

last_yr_models_dir

Full path in which the SS3 model directories are located for the the last assessment year

base_models_dir

Name of the base models directory

bridge_models_dir

Name of the bridging models directory

sens_models_dir

Name of the sensitivity models directory

request_models_dir

Name of the request models directory

test_models_dir

Name of the test models directory

base_models_dirs

A vector of subdirectory names in base_models_dir that each contain an individual SS3 base model

bridge_models_dirs

A vector of subdirectory names in bridge_models_dir that each contain an individual SS3 bridge model

sens_models_dirs

A vector of subdirectory names in sens_models_dir that each contain an individual SS3 sensitivity model

request_models_dirs

A vector of subdirectory names in request_models_dir that each contain an individual SS3 base model request model

test_models_dirs

A vector of subdirectory names in test_models_dir that each contain an individual SS3 base model test model

prepend_to_bridge

A vector of logical values, the same length as the number of groups of bridge models (length(bridge_models_dirs)) which, if TRUE will prepend the ⁠last_yr_base_model_dir``to the beginning of the group of that element number. If ⁠NULLorNA', no prepending will take place

suppress_warnings

If TRUE, warnings about directories not existing will not be shown

Details

Sensitivity groups will have the base model directory prepended, The bridge model groups can have last_yr_base_model_dir prepended if prepend_to_bridge is set to TRUE for the model group. If directories do not exist, they will be assigned NULL and a warning issued. If the models_dir does not exist, an error will be thrown.

Value

A list of twelve vectors of full paths, which will have NA elements for those which do not exist:

  1. Full path of models_dir

  2. Full path of last_yr_base_model_dir

  3. Full path of base_model_dir

  4. Full path of bridge_models_dir

  5. Full path of sens_models_dir

  6. Full path of request_models_dir

  7. Full path of test_models_dir

  8. A vector of the base model directories

  9. A vector of the bridge model directories

  10. A vector of the sensitivity model directories

  11. A vector of the request model directories

  12. A vector of the test model directories


pacific-hake/hake-assessment documentation built on Jan. 14, 2025, 9:12 p.m.