Skip to contents

Add model controls and scripts to the portalcasting directory and read in controls and model names.

Usage

write_models_controls(
  main = ".",
  new_models_controls = NULL,
  models = prefab_models()
)

write_models_scripts(main = ".", controls = prefab_models_controls())

read_models_controls(main = ".")

models_controls(main = ".", models = NULL)

Arguments

main

character value of the name of the main component of the directory tree.

new_models_controls

list of controls for any new models (not in the prefab models) listed in models that are to be added to the control list and file.

models

character vector of name(s) of model(s) to include.

controls

list of controls for the models.

Value

model_controls: list of models' control lists, invisible-ly.
read_models_controls: list of all models' control lists, from the file defined in directory_settings, invisible-ly.
write_models_controls: list of models' control lists, invisible-ly.
write_models_scripts: NULL, invisible-ly.

Examples

if (FALSE) { # \dontrun{
   main1 <- file.path(tempdir(), "models")

   create_dir(main = main1)
   fill_resources(main = main1)
   fill_forecasts(main = main1)
   fill_fits(main = main1)

   controls <- write_models_controls(main = main1)
   write_models_scripts(main     = main1, 
                      controls = controls)

   unlink(main1, recursive = TRUE)
} # }