Unified writer for engagement-related outputs with privacy enforcement. Parent directories are created if they do not exist.
Arguments
- data
A tibble containing the data to write
- what
Type of output: "engagement", "summary", or "session_summary" (default: "engagement")
- path
Explicit file path where the output will be written. No default path is used.
- comments_format
Deprecated alias for
comments_policy. Usecomments_policy = "count"orcomments_policy = "text"instead. Retained beforeprivacy_levelto preserve positional compatibility.- privacy_level
Privacy level for data export (default: from global option)
- comments_policy
Export policy for the
commentscolumn: "auto", "omit", "count", or "text" (default: "auto"). "auto" resolves to "omit" so raw transcript text is never exported accidentally. "text" is allowed only withprivacy_level = "none"and emits a warning.
Details
write_metrics() is the privacy-safe CSV export path. It applies
structured identifier masking with ensure_privacy() and then omits raw
free-text comments by default. ensure_privacy() does not redact identifiers
embedded inside comment text.