| ddmatrix-scale {pbdDMAT} | R Documentation |
Centers and/or scales the columns of a distributed matrix.
scale(x, center = TRUE, scale = TRUE) ## S4 method for signature 'ddmatrix' scale(x, center = TRUE, scale = TRUE)
x |
numeric distributed matrix. |
center |
logical value, determines whether or not columns are zero centered |
scale |
logical value, determines whether or not columns are rescaled to unit variance |
Returns a distributed matrix.
## Not run:
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r
library(pbdDMAT, quiet = TRUE)
init.grid()
comm.set.seed(diff=T)
x <- ddmatrix("rnorm", 10, 10)
y <- scale(x)
print(y)
finalize()
## End(Not run)