
Last chance! 50% off unlimited learning
Sale ends in
factorize(expression, snames = "", pos = FALSE, tilde, ...)
"qca"
.initial |
The input expression. |
factored |
All possible factorizations of the input expression. |
Factorization is a process of finding common factors in a Boolean expression, written in DNF - disjunctive normal form, or in a sum of products (SOP) form. The factorization is also possible using products of sums (POS) form.
Starting with version 2.1 of the package, a number of arguments have been deprecated.
For example, prod.split
, because intersections (products) are
indicated by the standard *
sign, and sometimes products are not
indicated by anything (for example when the set names are single letters.
The argument snames
is only needed when products are not indicated by
any sign at all, and the set names have more than one letter each (see function
translate()
for more details).
If expression
is an object of class "qca"
(the result of the
eqmcc()
minimization function), this function performs a factorization
for each of the minimized solutions.
translate
if (require("QCA")) {
# results presented in alphabetical order
factorize("one*TWO*four + one*THREE + THREE*four")
# to preserve a certain order of the set names
factorize("one*TWO*four + one*THREE + THREE*four",
snames = "ONE, TWO, THREE, FOUR")
factorize("~ONE*TWO*~FOUR + ~ONE*THREE + THREE*~FOUR",
snames = "ONE, TWO, THREE, FOUR")
# using pos - products of sums
factorize("a*c + a*D + b*c + b*D", pos = TRUE)
# using an object of class "qca" produced with eqmcc()
data(CVF)
pCVF <- eqmcc(CVF, outcome = "PROTEST", incl.cut = 0.8,
include = "?", use.letters = TRUE)
factorize(pCVF)
# using an object of class "deMorgan" produced with deMorgan()
factorize(deMorgan(pCVF))
}
Run the code above in your browser using DataLab