| %+-% | R Documentation |
Plus-minus operator
a %+-% b
a, b |
numeric vectors, matrices or arrays |
a +/- b, the dimension depends on a+b. If a+b is
a scalar, returns a vector of two; in the case of vector, returns a matrix;
all other cases will return an array with the last dimension equal to 2.
# scalar 1 %+-% 2 # -1, 3 # vector input c(1,2,3) %+-% 2 # matrix # matrix input matrix(1:9, 3) %+-% 2 # 3x3x2 array