Get the directory paths containing param files. This helps us run FACTS simulation scenarios one at a time.

get_param_dirs(param_files)

Arguments

param_files

Character, path to a top-level directory containing param files. run_flfll() and run_facts() return paths you can supply to param_files in get_param_dirs().

Value

Character vector of FACTS simulation scenario directories.

Details

When you run run_flfll() or run_facts(), rfacts creates a directory. This directory has a bunch of subdirectories, each corresponding to a single simulation scenario (VSR profile x accrual profile x dropout profile, etc).

Examples

# Can only run if system dependencies are configured:
if (file.exists(Sys.getenv("RFACTS_PATHS"))) {
facts_file <- get_facts_file_example("contin.facts")
param_files <- run_flfll(facts_file, verbose = FALSE)
scenarios <- get_param_dirs(param_files)
scenarios
scenario <- scenarios[1]
run_engine_contin(scenario, n_sims = 2, verbose = FALSE, version = "6.2.5")
read_patients(scenario)
}