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 (see
vignette("roadmap")).
Recipes are at least as sensitive as the original data. Protect the saved file at the same security class as the original.
Examples
r <- propose_roles(iris)
r$role[r$col == "Sepal.Length"] <- "outcome"
m <- mask(iris, r, mode = "collaborate", seed = 1)
tmp <- tempfile(fileext = ".rds")
save_recipe(recipe(m), tmp)
rec2 <- read_recipe(tmp)