R/tsqca_config_chart.R
config_chart_from_paths.RdA simpler interface for generating configuration charts when you have paths directly (without a full QCA solution object).
Character vector. Paths in QCA notation (e.g., "A*B*~C").
Character. One of "unicode", "ascii",
or "latex".
Character. "en" for English, "ja" for Japanese.
Character vector. Optional ordering of conditions.
Integer. Number of equivalent solutions. If > 1, a note is added explaining that multiple solutions exist and M1 is shown. Default is 1.
Logical. Whether to add solution note when n_sol > 1. Default is TRUE.
Character. "simple" or "detailed".
Default is "simple".
Character vector. Essential prime implicants for detailed notes.
Only used when solution_note_style = "detailed".
Character string containing Markdown-formatted table.
# 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.*