get_facts_engine {rfacts}R Documentation

Get the FACTS engine function matching your FACTS file

Description

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

Usage

get_facts_engine(facts_file)

Arguments

facts_file

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

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.

Value

Character, the name of a FACTS engine function.

See Also

run_facts(), run_engine()

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, version = "6.2.5")
# See the results.
read_patients(out)
}

[Package rfacts version 0.2.1 Index]