Generate decision rationale report
sdm_generate_report.RdRequests a rendered report from the SDM API. The report includes the analysis context, objectives, stakeholder profiles, value function curves, alternatives, the consequence matrix, radar chart, and the manager's written justification.
Usage
sdm_generate_report(
scenario,
format = "html",
file = NULL,
justification = NULL,
dry_run = FALSE,
verbosity = 0
)Arguments
- scenario
An
sdm_scenario()object.- format
Character.
"html"or"pdf".- file
Character. Output file path. If provided, the report is written to this path and the path is returned invisibly. If
NULL, the raw response is returned.- justification
Character. Manager's written justification for the selected alternative, or
NULLfor a placeholder.- dry_run
Logical. If TRUE, return the request without sending.
- verbosity
Integer. Verbosity level (0 = silent).
Value
If file is provided, the file path (invisibly). If
file is NULL, the raw API response (binary content).
Examples
if (FALSE) { # \dontrun{
# Save report to a file
sdm_generate_report(
scn,
format = "html",
file = "moose_report.html",
justification = "Reduce Harvest balances stakeholder needs
while maintaining population growth above replacement."
)
# Get raw response
raw <- sdm_generate_report(scn, format = "pdf")
writeBin(raw, "moose_report.pdf")
} # }