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
charactervalue of the name of the main component of the directory tree.- models
charactervector of name(s) of model(s) to include. Defaults toprefab_models. If controls are provided innew_models_controls, the model still needs to be named here to be included.- datasets
charactervector of name(s) of rodent dataset(s) to be created. Defaults toprefab_datasets. If controls are provided innew_datasets_controls, the dataset still needs to be named here to be included.- new_datasets_controls
Optional named
listof controls for new datasets. Seedatasets_controls.- new_models_controls
Optional named
listof controls for new models. Seemodels_controls.
Value
NULL, invisible-ly.
See also
Directory orchestration functions:
directory configuration file,
directory creation,
directory paths,
directory settings
Content preparation functions:
prepare covariates,
prepare metadata,
prepare models,
prepare newmoons,
prepare rodents
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)
} # }