These unary and binary operators perform arithmetic on numeric or complex vectors (or objects which can be coerced to them).
+ x
- x
x + y
x - y
x * y
x / y
x ^ y
x %% y
x %/% y
| Parameter | Description |
|---|---|
x, y |
numeric or complex vectors or objects which can be coerced to such, or other objects for which methods have been written. |
# NOT RUN {
x <- -1:12
x + 1
2 * x + 3
x %% 2 #-- is periodic
x %/% 5
x %% Inf # now is defined by limit (gave NaN in earlier versions of R)
# }