Skip to contents

Fill the directory with components including: * Resources (fill_resources) * raw data (download_observations) * directory archive (download_archive) * climate forecasts (download_climate_forecasts) * Output * forecasts (fill_forecasts) * model fits (fill_fits) * Data (fill_data) * rodent datasets (prepare_rodents) * temporal (lunar) data (prepare_newmoons) * covariates (prepare_covariates) * metadata (prepare_metadata) * Models (fill_models) * models controls (write_models_controls) * models scripts (if needed) (write_models_scripts) * Web Application (fill_app) * transfers app files from package to main * renders (render) and sources (source) files into HTML.

Additionally, new models and datasets can be added to the directory at filling using the optional arguments new_models_controls and new_datasets_controls, but the model or dataset must still be listed in its respective main argument, as well.

Usage

fill_dir(
  main = ".",
  models = prefab_models(),
  datasets = prefab_datasets(),
  new_datasets_controls = NULL,
  new_models_controls = NULL
)

fill_data(
  main = ".",
  datasets = prefab_datasets(),
  new_datasets_controls = NULL
)

fill_app(main = ".")

fill_resources(main = ".")

fill_forecasts(main = ".")

fill_fits(main = ".")

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

Arguments

main

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

models

character vector of name(s) of model(s) to include. Defaults to prefab_models. If controls are provided in new_models_controls, the model still needs to be named here to be included.

datasets

character vector of name(s) of rodent dataset(s) to be created. Defaults to prefab_datasets. If controls are provided in new_datasets_controls, the dataset still needs to be named here to be included.

new_datasets_controls

Optional named list of controls for new datasets. See datasets_controls.

new_models_controls

Optional named list of controls for new models. See models_controls.

Value

NULL, invisible-ly.

Examples

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

   create_dir(main = main1)
   fill_dir(main = main1)

   create_dir(main = main2, settings = production_settings())
   fill_resources(main = main2)
   fill_forecasts(main = main2)
   fill_fits(main = main2)
   fill_models(main = main2)
   fill_data(main = main2)
   fill_app(main = main2)

   unlink(main1, recursive = TRUE)
   unlink(main2, recursive = TRUE)
} # }