validate_input_file: Validate input file for a global run of FPEM

View source: R/user_interface.R

validate_input_fileR Documentation

Validate input file for a global run of FPEM

Description

The main input file for do_global_run and friends must meet certain requirements to be valid. These include correct column names and valid cell values. This function can be used to check that a candidate ‘.csv’ files satisfies these requirements.

Usage

validate_input_file(
  age_group = "15-49",
  input_data_folder_path = system.file("extdata", package = "FPEMglobal"),
  data_csv_filename = paste0("data_cp_model_all_women_", age_group, ".csv"),
  marital_group = c("married", "unmarried"),
  verbose = FALSE
)

Arguments

age_group

Character. The age group for which a run of the model is desired, specified in the format “xx-yy”, where “xx” is the start age, “yy” is the end age, e.g., "15-49" or "15-19". This is used to form the run name if run_name_override is NULL, to name of the file containing prevalence data if data_csv_filename is NULL, and to select rows from the denominator counts file if post-processing is done (see post_process_mcmc).

input_data_folder_path

File path to folder containing all input data (except any map shapefiles). If NULL the value of data_csv_filename, etc., will be passed to file.path as-is. Otherwise, file.path(input_data_folder_path, data_csv_filename) will be passed. The default value points to the data directory supplied with the package.

data_csv_filename

Filename of the ‘.csv’ file containing country-level prevalence data. See “Details”.

marital_group

Character. The marital group for which a run of the model is desired.

verbose

Logical; print lots and lots of messages about progress?

Details

See “Details” in the help file for do_global_all_women_run.

Value

If all checks pass, the processed input file is returned invisibly as a data frame.

Author(s)

Mark Wheldon

See Also

link{validate_denominator_counts_file}, do_global_all_women_run


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