colMultiply_cpp {riskRegression} | R Documentation |
Fast computation of sweep(X, MARGIN = 1, FUN = "*", STATS = scale)
colMultiply_cpp(X, scale)
X |
A matrix. |
scale |
a numeric vector of length equal to the number of rows of |
A matrix of same size as X.
Brice Ozenne <broz@sund.ku.dk>
x <- matrix(1,6,5)
sweep(x, MARGIN = 1, FUN = "*", STATS = 1:6)
colMultiply_cpp(x, 1:6 )