Explain Risks in Plain Language with Actionable Recommendations
Source:R/borg_explain.R
borg_explain_risk.RdTakes a BorgRisk or borg_result object and
returns a prioritized, human-readable action plan. Each risk is
translated into what went wrong, why it matters, how to fix it,
and the expected inflation magnitude.
Usage
borg_explain_risk(x, style = c("console", "markdown", "list"), verbose = FALSE)Arguments
- x
A
BorgRiskorborg_resultobject.- style
Character. Output style:
"console"(default, prints to terminal),"markdown"(returns markdown string), or"list"(returns structured list).- verbose
Logical. If
TRUE, include background explanations. Default:FALSE.
Value
Depending on style:
- "console"
Invisible
x, prints explanation.- "markdown"
Character string with markdown-formatted explanation.
- "list"
A list of per-risk explanation objects, each with fields:
risk_type,severity,plain_english,why_it_matters,how_to_fix,inflation_est.