assert_valid_output_dir: Check that a directory is a valid FPEMglobal output directory

View source: R/user_interface.R

assert_valid_output_dirR Documentation

Check that a directory is a valid FPEMglobal output directory

Description

Checks the content of output_dir to make sure certain directories and files are present. If some are missing, an error is returned, otherwise output_folder_path is returned invisibly.

Usage

assert_valid_output_dir(
  output_folder_path,
  post_processed = TRUE,
  countrytrajectories = post_processed,
  made_results = post_processed,
  adjusted_medians = post_processed,
  age_ratios = NULL,
  verbose = FALSE
)

Arguments

output_folder_path

Path (or paths, if a vector) to directory to validate.

post_processed

Logical; has post_process_mcmc been run on the directory?

countrytrajectories

Logical; check for ‘countrytrajectories’ or ‘aggregatetrajectories’ directories?

made_results

Logical; has make_results been run on the directory?

adjusted_medians

Logical; check for adjusted median results?

age_ratios

Logical; check for age ratio results? Defaults to FALSE if output_folder_path points to a “15-49” run, otherwise the value of post_processed.

Details

The default for 'post_processed' is 'TRUE' by because an un-processed directory doesn't even have 'mcmc.array.rda', which means it's unlikely to be used.

Value

If all checks pass, output_folder_path is returned invisibly, otherwise an error is thrown.

Author(s)

Mark Wheldon


FPcounts/FPEMglobal documentation built on July 20, 2024, 2:35 a.m.