Writes the recipe to a single .rds file. The default is
runtime-minimal:
no simulator state (copula covariance, raw margins) is written, only the
translation maps, factor metadata, storage classes, integrity fingerprint,
and warnings. This keeps the saved artefact small and reduces the
information that would leak if the recipe file alone were shared.
Details
include_simulator = TRUE is accepted but is currently a no-op: the
recipe does not carry simulator state. The flag is reserved for a
future release that will let read_recipe() regenerate fresh
synthetic samples without access to the original data.
Recipes are at least as sensitive as the original data. Protect the saved
file at the same security class as the original. Note that
save_recipe() writes plain R serialisation - it does not encrypt.
The saved recipe is a re-identification key: store it under your
organisation's access controls and key-management practice, not
alongside the synthetic output.
Examples
r <- propose_roles(iris)
r$role[r$col == "Sepal.Length"] <- "outcome"
m <- mask(iris, r, mode = "collaborate", seed = 1)
#> Re-resolved default actions for mode "collaborate" (explicit edits always win):
#> • Species: keep -> alias
tmp <- tempfile(fileext = ".rds")
save_recipe(recipe(m), tmp)
rec2 <- read_recipe(tmp)