%m+% | R Documentation |
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)
.
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
x, y |
Arrays or objects that can be coerced to arrays using |
The result of mmapply('XXX', x, y)
,
with XXX
replaced by the corresponding element-wise binary operator.
mmapply
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.