passthrough_result: A result that is not synthesised: copied, blanked or dropped

View source: R/synthesize.r

passthrough_resultR Documentation

A result that is not synthesised: copied, blanked or dropped

Description

For sheets that are empty, have no modelled columns, or are too small to synthesise (fewer than 4 * minbucket subject rows): legends, codebooks, lookup tables, tiny pilot tables.

Usage

passthrough_result(src, spec, how = c("blank", "copy", "drop"), reason = "")

Arguments

src

A synth_source.

spec

Its spec.

how

"copy" (verbatim), "blank" (identifiers, constant and empty columns kept, every modelled cell emptied) or "drop" (left out of the output workbook).

reason

Recorded in settings$passthrough.

Value

A synth_result with settings$passthrough set.

Examples

df <- data.frame(id = sprintf("AB%03d", 1:6), value = 1:6)
path <- file.path(tempdir(), "passthrough_result.csv")
utils::write.csv(df, path, row.names = FALSE, na = "")
src <- read_source(path)
spec <- infer_spec(src)
res <- passthrough_result(src, spec, how = "blank", reason = "Tiny table")
res$synthetic

cellsynth documentation built on Oct. 31, 2026, 1:07 a.m.