Learn R Programming

operator.tools (version 1.3.0)

rel.type: Get the relational type of a relational operator.

Description

rel.type gets the relational type of a relational operator. The relational type is one of 'gt', 'lt', 'eq', 'ne'.

Usage

rel.type(x)

Arguments

x
An operators expressed as a function or name

Value

  • character value of the operator. One of: 'gt', 'lt', 'eq', 'ne'.

Details

A relational operator is an operate that relates the relationship between arguments. The core relational operators are: >, >=, <, <="," =="," !="," the="" relational.type="" is="" a="" simple="" roll-up="" of="" these="" operators.=""> and >= are gt, etc. The value is retrieved from .Options$operators[[x]][['rel.type']] and can be defined for relational operators using setOperator. A relational type provides an indication of nature of the relational operator.

See Also

operators, setOperator

Examples

Run this code
rel.type( `==` ) 
  rel.type( as.name('==') )

Run the code above in your browser using DataLab