View source: R/Basic_functions.R
| standard | R Documentation | 
Standardization with double centered and column scaling
standard(data, dif.tol = 0.001, max.iter = 10)
data | 
 input matrix with n x px.  | 
dif.tol | 
 the value for the threshold of scaling  | 
max.iter | 
 default value = 10  | 
standardized matrix with n x px.
spmwm = 3*matrix(rnorm(100000),nrow=100)+1
dim(spmwm)
apply(spmwm,1,mean) # we want these to be 0
apply(spmwm,2,mean) # we want these to be 0
apply(spmwm,2,sd) # we want each of these variances to be 1
spmwm_cp=standard(spmwm)
max(abs(apply(spmwm_cp,1,mean)))
max(abs(apply(spmwm_cp,2,mean)))
max(abs(apply(spmwm_cp,2,sd)-1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.