pub fn r_package_available(pkg: &str) -> boolExpand description
Probe whether an R package can actually be loaded (namespace + any native
dyn.load) in the reference interpreter, without raising. Returns true
only when requireNamespace reports the package is usable.
This is the narrow, documented environmental-gate escape hatch — the same
category as the CUDA hardware gate and the DoubleML/EconML available flag,
NOT a general skip path. It exists for the handful of references the
reference-quality CI job provisions only best-effort because they are large
and/or native and not reliably installable on a bare runner (notably R-INLA,
whose bundled native binaries dyn.load per-OS). A test that gates on this
MUST still assert its tool-free, absolute quality bars unconditionally and
skip only the match-or-beat-vs-this-tool arm when the tool is genuinely
absent — never the gam-side claim. Every other reference dependency remains a
hard failure via run_r/run_python.