invert-methods {formula.tools} | R Documentation |
invert
is a S4 generic method for inverting the sense of relational
operators, i.e. changing '>' to '<=' and '
x |
A object such as an call or expression |
Does a hash look-up and returns the object with any relational operators inverted. It does not do a depth search.
The operand is returned with the relational operators inverted.
Christopher Brown
invert( quote( A > 5 ) ) invert( quote( A >= 5 ) ) invert( quote( A < 5 ) ) invert( quote( A <= 5 ) ) invert( quote( A == 5 ) ) invert( quote( A != 5 ) ) # invert( expression( A>1, B<2, c