Data Infix Operators in R

Intro to Infix Operators in R

postfixInfix operators in R are unique functions and methods that facilitate basic data expressions or transformations.  

Infix refers to the placement of the arithmetic operator between variables.  For example, an infix operation is given by (a+b), whereas prefix and postfix operators are given by (+ab) and (ab+), respectively.  

The types of infix operators used in R include functions for data extraction, arithmetic, sequences, comparison, logical testing, variable assignments, and custom data functions. 

The primary infix operators and their rank are listed below.  The rank of an operator indicates the order in which a function is processed by R.  This is relevant for dealing with complex expressions that involve two or more operators.  Rank also confirms if brackets or parenthesis are useful or redundant.  Examples in the table use the following data vectors as inputs:

List of Infix Operators in R

[table id=4 /]

Back | Next