Examine the file paths to executables and check that they exist and have the correct permissions.
rfacts_sitrep()
A data frame of information on the status of each executable.
rfacts
has strict system requirements, and the installations
vary from system to system. You need to specify the locations of
system executables in a CSV file that lists the path and metadata
of each executable. This file must have one row per executable
and the following columns.
executable_type
: Must be "mono", "flfll", or "engine" to
denote the general type of the executable.
facts_version
: The version of FACTS with which this executable
is compatible.
path
: File path to the executable.
engine_name
: For engines only. Name of the engine.
Must be one of the engine types in the example CSV file at
system.file("example_paths.csv", package = "rfacts")
.
param_set
: For engines only. Parameter set designation listed in the
XML code of FACTS files for that engine. See
system.file("example_paths.csv", package = "rfacts")
for examples.
param_type
: For engines only. Parameter type designation listed in the
XML code of FACTS files for that engine. See
system.file("example_paths.csv", package = "rfacts")
for examples.
When you call a trial simulation function in rfacts
,
the package automatically reads this file
and memorizes the contents for later use. The file at
system.file("example_paths.csv", package = "rfacts")
(inst/example_paths.csv
in the package source.)
has an example of such a file. All the columns in that file
are required, and you may, remove, or modify rows to fit
your specific system.
To enable rfacts
to find this CSV file, you need to
set the RFACTS_PATHS
environment variable to the
path to this file. The easiest way to do this is call
usethis::edit_r_environ()
to edit your .Renviron
file
and then add a new line with something like
RFACTS_PATHS=/path/to/file/paths.csv
. Then,
restart your R session and call Sys.getenv("RFACTS_PATHS")
to verify that this environment variable was set correctly.
The rfacts_sitrep()
function inspects the current system dependency
info and ensures each executable exists and has the correct permissions.
If you change the RFACTS_PATHS
environment variable,
you need to call reset_rfacts_paths()
or restart R
for the changes to take effect.
rfacts_paths
# Can only run if system dependencies are configured:
if (file.exists(Sys.getenv("RFACTS_PATHS"))) {
rfacts_sitrep()
}