Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

factorize

Factorize Configurational Expressions


Description

This function finds all possibilities for factorizing a configurational expression.

Usage

factorize(expression, and.split = "", sort.factorizing = FALSE, 
          sort.factorized = FALSE)

Arguments

expression

A string representing a configurational expression or a QCA solution object of class “qca” generated by eQMC().

and.split

The AND-operator (if any).

sort.factorizing

Logical, sort results beginning with largest number of factorizing elements.

sort.factorized

Logical, sort results beginning with largest number of factorized elements.

Details

In Boolean algebra, the “*”-operator is distributive over the “+”- operator such that for any three literals a, b and c, the following law holds: (a*b) + (a*c) = a*(b + c) (Hohn 1966, pp.78-80; South 1974, p.12). The 'factorize' function finds all possible a for any configurational expression. Factorized versions of the initial expression(s) can be sorted in decreasing order by the number of factorizing literals or in decreasing order by the number of factorized literals.

Value

A list with the following components:

initial

The initial expression.

factored

The factorizations of the initial expression.

Contributors

Dusa, Adrian : development, programming, testing
Thiem, Alrik : development, documentation, testing

Author(s)

References

Hohn, Franz E. 1966. Applied Boolean Algebra: An Elementary Introduction. 2nd ed. New York: Macmillan.

South, G. F. 1974. Boolean Algebra and Its Uses. New York: Van Nostrand Reinhold.

See Also

Examples

# factorize a disjunction of two two-way conjunctions;
# if single letters are used, argument "and.split" is not needed
factorize("AB + AC")

# "and.split" is needed in these cases
factorize("one*TWO*four + one*THREE + THREE*four", and.split = "*")
factorize("~ONE*TWO*~FOUR + ~ONE*THREE + THREE*~FOUR", and.split = "*")
factorize("one&TWO&four + one&THREE + THREE&four", and.split = "&")

# factorize solution objects directly
data(d.represent)
KRO.sol <- eQMC(d.represent, outcome = "WNP")
factorize(KRO.sol)

QCApro

Advanced Functionality for Performing and Evaluating Qualitative Comparative Analysis

v1.1-2
GPL-3
Authors
Alrik Thiem [aut, cre, cph], Michael Baumgartner [ctb], Adrian Dusa [ctb], Reto Spoehel [ctb]
Initial release
2018-01-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.