| %xor% | R Documentation |
This is a logical operator that implements XOR. (Exclusive or).
lhs %xor% rhs
lhs |
The left-hand side(s). |
rhs |
The right-hand side value(s). |
The XOR truth-table is as follows:
| LHS | RHS | Value |
| TRUE | TRUE | FALSE |
| TRUE | FALSE | TRUE |
| FALSE | TRUE | TRUE |
| FALSE | FALSE | FALSE |
In contrast with the standard OR, XOR evaluates to FAlSE if both arguments are TRUE.
An atomic value or vector the same length as the left-hand side input.
{
TRUE %xor% TRUE # Evaluates to FALSE
FALSE %xor% TRUE # Evaluates to TRUE
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.