A simpler interface for generating configuration charts when you have paths directly (without a full QCA solution object).

config_chart_from_paths(
  paths,
  symbol_set = c("unicode", "ascii", "latex"),
  language = c("en", "ja"),
  condition_order = NULL,
  n_sol = 1L,
  solution_note = TRUE,
  solution_note_style = c("simple", "detailed"),
  epi_list = NULL
)

Arguments

paths

Character vector. Paths in QCA notation (e.g., "A*B*~C").

symbol_set

Character. One of "unicode", "ascii", or "latex".

language

Character. "en" for English, "ja" for Japanese.

condition_order

Character vector. Optional ordering of conditions.

n_sol

Integer. Number of equivalent solutions. If > 1, a note is added explaining that multiple solutions exist and M1 is shown. Default is 1.

solution_note

Logical. Whether to add solution note when n_sol > 1. Default is TRUE.

solution_note_style

Character. "simple" or "detailed". Default is "simple".

epi_list

Character vector. Essential prime implicants for detailed notes. Only used when solution_note_style = "detailed".

Value

Character string containing Markdown-formatted table.

Examples

# Simple usage with paths
paths <- c("A*B", "A*C*~D", "B*E")
chart <- config_chart_from_paths(paths)
cat(chart)
#> | Condition | T1 | T2 | T3 |
#> |:--:|:--:|:--:|:--:|
#> | A | ● | ● |  |
#> | B | ● |  | ● |
#> | C |  | ● |  |
#> | D |  | ⊗ |  |
#> | E |  |  | ● |
#> 
#> *● = presence, ⊗ = absence, blank = don't care*

# With ASCII symbols
chart <- config_chart_from_paths(paths, symbol_set = "ascii")
cat(chart)
#> | Condition | T1 | T2 | T3 |
#> |:--:|:--:|:--:|:--:|
#> | A | O | O |  |
#> | B | O |  | O |
#> | C |  | O |  |
#> | D |  | X |  |
#> | E |  |  | O |
#> 
#> *O = presence, X = absence, blank = don't care*

# With multiple solution note
chart <- config_chart_from_paths(paths, n_sol = 2)
cat(chart)
#> | Condition | T1 | T2 | T3 |
#> |:--:|:--:|:--:|:--:|
#> | A | ● | ● |  |
#> | B | ● |  | ● |
#> | C |  | ● |  |
#> | D |  | ⊗ |  |
#> | E |  |  | ● |
#> 
#> *● = presence, ⊗ = absence, blank = don't care*
#> 
#> *Note: 2 logically equivalent solutions were identified. This table presents configurations based on M1.*

# With detailed note including EPIs
chart <- config_chart_from_paths(
  paths, n_sol = 2,
  solution_note_style = "detailed",
  epi_list = c("A*B")
)
cat(chart)
#> | Condition | T1 | T2 | T3 |
#> |:--:|:--:|:--:|:--:|
#> | A | ● | ● |  |
#> | B | ● |  | ● |
#> | C |  | ● |  |
#> | D |  | ⊗ |  |
#> | E |  |  | ● |
#> 
#> *● = presence, ⊗ = absence, blank = don't care*
#> 
#> *Note: 2 logically equivalent solutions were identified (M1-M2). This table presents configurations based on M1. All solutions share the essential prime implicant: A·B.*