Expressions written in SOP are used in Boolean logic, signaling a
disjunction of conjunctions.
These expressions are useful in Qualitative Comparative Analysis, a social
science methodology used to search for causal configurations associated with
a certain outcome.
They are also used to draw Venn diagrams with package venn, which draws
any kind of set intersection based on a custom SOP expression.
curlyBrackets(), squareBrackets() and roundBrackets() are special cases
of betweenBrackets() and outsideBrackets(), using curly, square or round
brackets through the type argument.
outsideBrackets() can also be seen as a special case of
betweenBrackets(invert = TRUE).
SOP expressions are usually written using curly brackets for multi-value
conditions but, to allow evaluation of unquoted expressions through R's
parser, unquoted expressions should use square brackets and conjunctions
should always use the product * sign.
Sufficiency is recognized as "=>" in quoted expressions but this does not
pass over R's parsing system in unquoted expressions. To overcome this
problem, it is best to use the single arrow "->" notation. Necessity is
recognized as either "<=" or "<-", both being valid in quoted and
unquoted expressions.