Learn R Programming

DCC (version 1.2.1)

dcc_export_log: Export an audit log for external auditors

Description

Writes the cell-level audit log to disk. Parquet is the default storage format (design decision 3 in docs/design.md); CSV export exists so external auditors can open the log without special tooling.

Usage

dcc_export_log(x, path, format = c("parquet", "csv"))

Value

path, invisibly.

Arguments

x

A dcc_result from dcc_execute.

path

Output file path.

format

"parquet" (default; schema-typed and compact, requires the arrow package) or "csv" (plain file for auditors without Parquet tooling).

Examples

Run this code
df <- data.frame(sid = "S1", q1 = 9)
f <- dcc_findings("S1", variable = "q1", check_id = "C",
                  evidence = "legacy code")
res <- dcc_execute(df, f, actions = list(C = "set_na"), id_var = "sid")
csv <- tempfile(fileext = ".csv")
dcc_export_log(res, csv, format = "csv")

Run the code above in your browser using DataLab