powered by
Fast computation of sweep(X, MARGIN = 2, FUN = "/", STATS = scale)
rowScale_cpp(X, scale)
A matrix.
a numeric vector of length equal to the number of rows of x
x
A matrix of same size as X.
# NOT RUN { x <- matrix(1,6,5) sweep(x, MARGIN = 2, FUN = "/", STATS = 1:5) rowScale_cpp(x, 1:5 ) rowScale_cpp(x, colMeans(x) ) # }
Run the code above in your browser using DataLab