Identify the correct run_engine_*() function for your FACTS file.

get_facts_engine(facts_file)

Arguments

facts_file

Character, name of a FACTS file. Usually has a *.facts file extension.

Value

Character, the name of a FACTS engine function.

Details

For most cases, it is sufficient to call run_facts(), or to call run_flfll() followed by run_engine(). But either way, you will need to know the arguments of the run_engine_*() function that corresponds to your FACTS file. Even if you are not calling this run_engine_*() directly, you will need to pass the arguments to ... in run_facts() or run_engine(). get_facts_engine() identifies the correct run_engine_*() function so you can open the help file and read about the arguments, e.g. ?run_engine_contin.

See also

Examples

# Can only run if system dependencies are configured: if (file.exists(Sys.getenv("RFACTS_PATHS"))) { facts_file <- get_facts_file_example("contin.facts") out <- run_flfll(facts_file, verbose = FALSE) # Generate param files. # Find the appropriate FACTS engine function. get_facts_engine(facts_file) # Read about the function arguments. # You can pass these arguments to `...` in `run_facts()` # or `run_engine()` or just call `run_engine_contin()` directly. # ?run_engine_contin # Call the FACTS engine function to run simulations. # Alternatively, you could just call `run_engine()`. run_engine_contin(out, n_sims = 1, verbose = FALSE) # See the results. read_patients(out) }