write_spec: Write a spec to CSV for review and editing

View source: R/spec.r

write_specR Documentation

Write a spec to CSV for review and editing

Description

Only the role column is meant to be edited by hand; the rest documents why the heuristics chose it. The file holds column names and counts only, no cell values.

Usage

write_spec(spec, path)

Arguments

spec

A spec data.frame.

path

Output .csv path.

Value

path, invisibly.

Examples

df <- data.frame(id = sprintf("AB%03d", 1:60), value = 1:60)
path <- file.path(tempdir(), "write_spec_source.csv")
utils::write.csv(df, path, row.names = FALSE, na = "")
spec <- infer_spec(read_source(path))
spec_path <- file.path(tempdir(), "write_spec.csv")
write_spec(spec, spec_path)
file.exists(spec_path)

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