get_param_dirs {rfacts}R Documentation

List the directories containing param files

Description

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

Usage

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().

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).

Value

Character vector of FACTS simulation scenario directories.

See Also

get_facts_scenarios(), run_facts(), run_flfll(), run_engine(), run_engine_contin()

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)
}

[Package rfacts version 0.2.1 Index]