Summarize each run as one row (initial/final SOC, delta)
f.table.compare.socmo.res.RdReduces the yearly output of every run in l.res to a single summary
row: SOC at the first and last simulated year, the average SOC over
the last n.years.end.avg years, and the resulting deltas (absolute
and per year). The result is the input expected by
f.graph.delta.soc(), f.graph.evol.soc() and f.graph.variation().
Usage
f.table.compare.socmo.res(
l.res,
input.sim.run,
input.case,
id.to.compare = "all",
years.range = "all",
n.years.end.avg = 3,
op.simplify = TRUE,
op.xlsx = FALSE,
op.params = FALSE
)Arguments
- l.res
Named list of per-treatment results, as returned by
run.socmo().- input.sim.run, input.case
Same simulation run/case identifiers passed to
run.socmo().- id.to.compare
Subset of IDs (names of
l.res) to compare, or"all".- years.range
Subset of years to keep, or
"all".- n.years.end.avg
Number of final years averaged into
SOC_end_avg/deltaSOC_avg.- op.simplify
If
TRUE(default), pivot to one row peridwithyear_init/year_end/SOC_init/SOC_end/deltaSOC/deltaSOC_per_yearcolumns; ifFALSE, return the long first/last-year rows instead.- op.xlsx, op.params
Reserved for optional xlsx export and inclusion of model/soil parameter columns (see call sites).
Value
A data frame, one row per treatment id (when
op.simplify = TRUE), joined with the workbook's Info sheet
metadata (info, Trial_ID, text_uk, ...).