write_cleaning_doc: Write a cleaning summary document for ternP output

View source: R/write_cleaning_doc.R

write_cleaning_docR Documentation

Write a cleaning summary document for ternP output

Description

Generates a Word document summarising the preprocessing transformations applied by ternP. Only sections for triggered transformations are written; if the data required no preprocessing, a single sentence stating that is produced instead. The document can be attached to a data-management log or supplemental materials.

Usage

write_cleaning_doc(result, filename = "cleaning_summary.docx")

Arguments

result

A ternP_result object returned by ternP.

filename

Output file path ending in .docx. Default is "cleaning_summary.docx" in the current working directory.

Value

Invisibly returns the path to the written Word file.

See Also

ternP, write_methods_doc

Examples


path   <- system.file("extdata/csv", "tern_colon_messy.csv",
                      package = "TernTables")
raw    <- read.csv(path, stringsAsFactors = FALSE)
result <- ternP(raw)
write_cleaning_doc(result, filename = file.path(tempdir(), "cleaning_summary.docx"))


TernTables documentation built on March 26, 2026, 5:09 p.m.