dr_review()
Opens a diagnostic table with
utils::View() and returns that same table
invisibly. IDEs such as Positron and RStudio display it in their data viewer.
Use the diagnostic functions directly in headless sessions.
Usage
dr_review(
result = dr_last_failure(),
what = c("rows", "report", "lineage"),
rule = NULL,
contract = NULL,
limit = 100
)Arguments
- result
- A diagnostic input accepted by the selected function. Rows
accept run/model results or a table with
ruleand, for named checks,contract. Reports also accept quality tables, run/dbt results and measurements. Lineage accepts the inputs documented bydr_lineage(). Omit this argument to reviewdr_last_failure(). - what
- Diagnostic table to display: affected rows, quality report or recorded dataset lineage.
- rule, contract
- Arguments to
dr_quality_rows(). Only valid for rows. Use"table/check"to choose a check from a model result. - limit
- Maximum affected rows to collect. Must be a finite non-negative
whole number; defaults to 100. Only valid for rows. To explicitly request
every affected row, call
dr_quality_rows()directly instead.
Value
The displayed diagnostic tibble, invisibly.
Details
"rows" delegates to dr_quality_rows() and collects at most limit
affected rows. Row predicates are re-evaluated against the retained candidate;
keep their captured constants unchanged. "report" uses dr_quality_report()
without exporting a file. "lineage" uses dr_lineage(). These last two
choices inspect metadata, not the source rows. No run is retried and the
retained last failure is not cleared.
Examples
\dontshow{if (interactive()) withAutoprint(\{ # examplesIf}
orders <- dr_product("orders", data.frame(amount = c(10, -2))) |>
dr_add_quality(list(positive = ~ amount >= 0))
result <- dr_run(write = FALSE, orders, stop_on_failure = FALSE)
dr_review(result, rule = "positive", limit = 20)
dr_review(result, what = "report")
\dontshow{\}) # examplesIf}Documentation source snapshot · View source at d9cb454 ↗
Code examples are documented source examples; they are not executed in this website build.
Code examples are documented source examples; they are not executed in this website build.