Writes a JoinReport object to a file for audit trails and reproducibility.
Supports plain text, JSON, and RDS formats.
Arguments
- report
A
JoinReportobject fromjoin_spy()or retrieved vialast_report().- file
File path to write to. Extension determines format:
.txtor.log: Plain text (human-readable).json: JSON format (machine-readable).rds: R binary format (preserves all data)
- append
Logical. If
TRUE, appends to existing file (text/log only). DefaultFALSE.- timestamp
Logical. If
TRUE(default), includes timestamp in output.
Examples
orders <- data.frame(id = 1:3, value = c(10, 20, 30))
customers <- data.frame(id = c(1, 2, 4), name = c("A", "B", "D"))
report <- join_spy(orders, customers, by = "id")
# Log to text file
if (FALSE) { # \dontrun{
log_report(report, "join_audit.log", append = TRUE)
} # }