
Create a one-command agent-ready bundle from a raw data file
Source:R/make-agent-bundle.R
make_agent_bundle.RdReads a data file, profiles it, detects column roles, synthesizes data, and exports a zip bundle suitable for passing to an AI agent.
Arguments
- file
Path to the input data file. Passed to
read_input().- out
Path for the output zip file.
- purpose
Synthesis purpose preset. Defaults to
"development". Seesynth_spec()for valid values.- seed
Optional integer random seed for reproducible synthesis.
- overwrite
Logical. When
FALSE(the default), aborts ifoutalready exists.- ...
Additional arguments passed to
read_input()only (e.g.encoding,sheet).
Examples
dat <- data.frame(
age = c(24, 28, 35, 41),
score = c(88, 91, 84, 95),
grp = c("A", "A", "B", "B")
)
path <- tempfile(fileext = ".csv")
readr::write_csv(dat, path)
make_agent_bundle(
file = path,
out = tempfile(fileext = ".zip"),
purpose = "demo",
seed = 1
)
#> Warning: Cannot guarantee level presence for columns: grp (2 levels at k = 5 require
#> minimum n = 10). Largest minimum n = 10; output has n = 4. Restoring as many
#> levels as fit without removing another level's last copy.