Description Usage Arguments Details Value Contributors Author(s) References See Also Examples
This function negates simple or complex Boolean expressions using the two De Morgan Laws.
1 2 3 | DeMorgan(expression, and.split = "")
is.DeMorgan(x)
|
expression |
A string representing a Boolean expression or a solution object of class 'qca'. |
and.split |
The AND-operator (if any). |
x |
An object of class 'DeMorgan'. |
The two De Morgan laws posit that the negation of a disjunction is the conjunction of its separate negations, and the negation of a conjunction is the disjunction of its separate negations (Hohn 1966, p.80).
The argument expression
can be any complex string representing a
Boolean expression of disjunctions and conjunctions, or a solution object of
class 'qca' (objects returned by the 'eQMC
' function).
A list of solutions with their negations as components if expression
is an object of class 'qca', or simply a list with the following components
if expression
is a string:
initial |
The initial expression. |
negated |
The negation of the initial expression. |
Dusa, Adrian | : development, programming, testing |
Thiem, Alrik | : development, documentation, testing |
Alrik Thiem (Personal Website; ResearchGate Website)
Hohn, Franz E. 1966. Applied Boolean Algebra: An Elementary Introduction. 2nd ed. New York: Macmillan.
Ragin, Charles C. 1987. The Comparative Method: Moving beyond Qualitative and Quantitative Strategies. Berkeley: University of California Press.
1 2 3 4 5 6 7 8 9 10 11 12 | # example from Ragin (1987, p.99)
DeMorgan("AC + B~C")
# with different AND-operators
DeMorgan("A*C + B*~C", and.split = "*")
DeMorgan("A&C + B&~C", and.split = "&")
# use solution object of class 'qca' returned by 'eQMC' function,
# even with multiple models
data(d.represent)
KRO.ps <- eQMC(d.represent, outcome = "WNP")
DeMorgan(KRO.ps)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.