invert-methods: invert

Description Usage Arguments Value Author(s) See Also Examples

Description

Invert the operators in an object, usually a formula or expression

Usage

1
2
3
4
5
6
7
invert(x, ...)

## S4 method for signature 'call'
invert(x)

## S4 method for signature 'expression'
invert(x)

Arguments

x

function for invert

...

additional arguments passed other functions

invert is a S4 generic method for inverting relational operators, i.e.

functions prefixed with a . are not exported and should probably not be called directly

Value

The operand is returned with the relational operators inverted.

Author(s)

Christopher Brown

See Also

op, op.type

Examples

1
2
3
4
5
6
7
8
  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( quote( A %in% lettters[1:5] ) )
  invert( quote( A %!in% letters[1:5] ) )

formula.tools documentation built on May 2, 2019, 1:45 p.m.