Apply * by slice
Fast computation of sweep(X, MARGIN = 1:2, FUN = "*", STATS = scale)
sliceMultiply_cpp(X, M) sliceMultiplyPointer_cpp(X, M)
X |
An array. |
M |
A matrix with the same number of row and columns as X. |
An array of same size as X.
Brice Ozenne <broz@sund.ku.dk>
x <- array(1, dim = c(2,6,5)) M <- matrix(1:12,2,6) sweep(x, MARGIN = 1:2, FUN = "*", STATS = M) sliceMultiply_cpp(x, M)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.