Writes a multi-sheet workbook summarising a ks_comparison. Sheets:
Summary, Schema, KeyDiff, Values, Patterns,
OUT_BASE, OUT_COMP, OUT_DIF, OUT_NOEQUAL, Manifest. Cells with
value differences are highlighted on the wide OUT_DIF sheet.
Arguments
- x
A
ks_comparisonobject.- path
File path for the workbook. When
NULL(default), the filename is auto-generated from the comparison'sbase_name/comp_nameand placed inoptions$path(if set onks_comp_options()) or the current working directory, e.g.ksCompare_adsl_vs_adsl_qc.xlsx. A.xlsxextension is appended if missing. A bare filename is resolved againstoptions$pathwhen that has been set.- highlight
If
TRUE(default), apply conditional formatting to highlight numericOUT_DIFcells whose magnitude is abovethreshold.- threshold
Numeric threshold for highlighting (default
0, so any non-zero diff is highlighted).
Examples
if (FALSE) { # \dontrun{
cmp <- ks_compare(iris, iris, by = "Species")
ks_report_xlsx(cmp, "report.xlsx")
# Auto-named output in a pinned folder
cmp2 <- ks_compare(
iris, iris, by = "Species",
options = ks_comp_options(path = tempfile("ksCompare_"))
)
ks_report_xlsx(cmp2)
} # }
