format_qca_term: Format a single QCA term

View source: R/tsqca_helpers.R

format_qca_termR Documentation

Format a single QCA term

Description

Inserts * between variables in a term where it may have been omitted.

Usage

format_qca_term(term, var_names, use_tilde = TRUE)

Arguments

term

Character. A single term (e.g., "KSPRVT" or "~KPR*PRD").

var_names

Character vector. Variable names used in the analysis.

use_tilde

Logical. If TRUE, negation is represented as ~VAR. If FALSE, negation is represented as lowercase (e.g., var).

Value

Character. The formatted term with * between all variables.

Examples

var_names <- c("KSP", "KPR", "PRD", "RVT", "RCM")
format_qca_term("KSPRVTRCM", var_names)
# Returns: "KSP*RVT*RCM"

format_qca_term("~KPRPRD", var_names)
# Returns: "~KPR*PRD"

TSQCA documentation built on Feb. 18, 2026, 5:06 p.m.