R Language Arithmetic Operators

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

Nearly all operators in R are really functions. For example, + is a function defined as function (e1, e2) .Primitive("+") where e1 is the left-hand side of the operator and e2 is the right-hand side of the operator. This means it is possible to accomplish rather counterintuitive effects by masking the + in base with a user defined function.

For example:

`+` <- function(e1, e2) {e1-e2}

> 3+10
[1] -7


Got any R Language Question?