
Audit manuscript prose or tables supplied as an in-memory string
Source:R/audit-manuscript.R
audit_manuscript_text.RdIn-memory counterpart to audit_manuscript(), supporting Markdown/Quarto
and LaTeX (.tex) prose, tables, and internal arithmetic verification.
Usage
audit_manuscript_text(
text,
models = NULL,
tol_extra = 0,
warn_rounding = TRUE,
default_model = NULL,
format = c("auto", "markdown", "tex"),
check_internal = TRUE
)Arguments
- text
Character scalar or vector of manuscript lines.
- models
Optional saved models to cross-check against. One of:
A named list of fitted model objects (
lm,glm,lmerMod,htest) or tidy summary data frames;A single fitted model object or tidy summary data frame;
Path to an
.rdsfile containing a model or named list of models;Path to a directory containing
.rdsmodel files (keyed by filename stem);NULLto run internal arithmetic consistency checks only.
- tol_extra
Non-negative numeric extra tolerance added on top of the automatic rounding half-unit (
0.5 * 10^(-decimals)). Default0.- warn_rounding
Logical; if
TRUE(default), values off by at most one unit in the last reported decimal place are flagged as"warn"(rounding_discrepancy) rather than"fail".- default_model
Optional default model name used for untagged claims when multiple models are provided.
- format
Document format:
"auto"(detects LaTeX commands automatically),"markdown"(Quarto/RMarkdown), or"tex"(LaTeX).- check_internal
Logical; if
TRUE(default), run interval-arithmetic internal consistency checks (tvsb / SE,95% CImidpoint & width vsbandSE) on every claim group and table row.