Creates a workbook with one config tab that lists all attribute levels and
restriction-specific sections.
Examples
cfg <- cjtd_design_config(
attributes = list(
brand = c("A", "B", "C", "D"),
price = c("very_high", "high", "mid", "low", "very_low"),
f1 = c("off", "on"),
f2 = c("off", "on"),
f3 = c("off", "on")
),
n_tasks = 10,
n_alternatives = 3,
n_versions = 2
)
cfg <- cjtd_forbid_pairs(
cfg,
attr_a = "brand",
levels_a = "A",
attr_b = "price",
levels_b = "very_low"
)
cfg <- cjtd_require_n_selected(
cfg,
selected = list(
f1 = "on",
f2 = "on",
f3 = "on"
),
n = 1:2
)
wb <- cjtd_design_config_render(cfg)
wb
#> A Workbook object.
#>
#> Worksheets:
#> Sheet 1: "config"
#>
#> Custom column widths (column: width)
#> 1: 29, 2: 11, 3: 10, 4: 11
#>
#>
#>
#> Worksheet write order: 1
#> Active Sheet 1: "config"
#> Position: 1
#>