Loads simulation, observation and reference data from sim_rds,
obs_rds and ref_sim_rds into a temporary evaluation
workspace, runs the global, per-species and per-USM evaluations,
exports results to output_dir (if defined), prints a summary,
and stops with an error if any evaluation failed. evaluate()
never runs STICS simulations itself — use run_simulations
to produce sim_rds / obs_rds beforehand.
evaluate(
usms_workspace,
sim_rds,
obs_rds,
ref_sim_rds = NULL,
output_dir = NULL,
percentage = 5,
species = NULL,
usms = NULL,
var2exclude = NULL,
ratio_threshold = 50,
degraded_threshold = 20,
max_degraded_vars = 3,
parallel = FALSE,
cores = NA,
verbose = 1L
)path to the Stics text workspace containing the USMs to evaluate. Used to determine the species associated with each USM
path to an .rds file containing pre-computed
simulation results for the evaluated version — see
run_simulations
path to an .rds file containing pre-computed
observation data — see run_simulations
path to an .rds file containing pre-computed
simulation results for the reference version. If NULL (default),
evaluation runs against observations only, without regression
comparison against a reference
directory where CSV exports and plots are written. If NULL (default), results are not exported
threshold (%) above which a variable is flagged as deteriorated vs. the reference (default 5)
optional character vector of species to evaluate. NULL (default) evaluates all available species
optional character vector of USMs to evaluate. NULL (default) evaluates all available USMs
optional character vector of variables to exclude from evaluation
numeric threshold (%) above which a single variable makes a USM fail the USM-level evaluation (default 50)
numeric threshold (%) above which a variable is considered degraded for the USM-level evaluation (default 20)
maximum number of degraded variables (ratio >
degraded_threshold) tolerated per USM before it is considered
failed (default 3, i.e. fails starting at 4 degraded variables)
Boolean. Is the computation to be done in parallel ?
Number of cores to use for parallel computation
Integer. Logging verbosity level: 0 = silent, 1 = info, 2 = debug
Invisibly NULL. Called for its side effects: workspace
creation, evaluation runs, and console reporting.
The function proceeds in the following steps:
Creates a temporary evaluation workspace, cleaned up on exit.
Loads simulation/observation/reference data into it.
Runs the global, per-species and per-USM evaluations.
Exports results to output_dir if defined.
Prints their respective summaries.
Displays a CLI report listing each evaluation as success (green ✔) or failed (red ✗).
Stops with an error if at least one evaluation did not succeed.