Learn R Programming

operator.tools (version 1.6.3.1)

inverse: Invert an R operator

Description

inverse is a S3 generic method for inverting an R operator in the mathematical sense. Presently, inverses are defined for relational operators, i.e. changing > to <= etc.

Usage

inverse(x, ...)

Value

inverse returns the inverse in the same form as the x

argument. Thus, if a name is provided, a name is returned. If a function is provided, a function is returned.

Arguments

x

object representing an R operator

...

additional arguments

Author

Christopher Brown

Details

Arguments will be checked against the defined list of inverses, If an entry exists, the corresponding inverse is returned.

References

http://en.wikipedia.org/wiki/Inverse_mathematics.

See Also

operators especially operators(type="relational"))

Examples

Run this code
  if (FALSE) {
    inverse( as.name( '!=' ) )
    inverse( `==` )
 } 

Run the code above in your browser using DataLab