powered by
Fast computation of sweep(X, MARGIN = 1, FUN = "-", STATS = center)
colCenter_cpp(X, center)
A matrix of same size as X.
A matrix.
a numeric vector of length equal to the number of rows of x
x
Brice Ozenne <broz@sund.ku.dk>
x <- matrix(1,6,5) sweep(x, MARGIN = 1, FUN = "-", STATS = 1:6) colCenter_cpp(x, 1:6 )
Run the code above in your browser using DataLab