%m+% {implicitExpansion} | R Documentation |
Binary Operators with Implicit Expansion
Description
Modified versions of binary operators that support implicit expansion.
Arguments are passed to mmapply()
with the corresponding element-wise binary operator.
For instance, x %m+% y
is equivalent to mmapply('+', x, y)
.
Usage
x %m+% y
x %m-% y
x %m*% y
x %m/% y
x %m^% y
x %m==% y
x %m!=% y
x %m>% y
x %m<% y
x %m>=% y
x %m<=% y
x %m|% y
x %m&% y
Arguments
x , y |
Arrays or objects that can be coerced to arrays using |
Value
The result of mmapply('XXX', x, y)
,
with XXX
replaced by the corresponding element-wise binary operator.
See Also
Examples
x <- c(1,2,3)
y <- t(c(4,5))
x %m+% y
m <- matrix(3*(1:12)^2, 3, 4)
cm <- t(colMeans(m))
m %m-% cm
(1:3) %m>=% t(3:1)
[Package implicitExpansion version 0.1.0 Index]