powered by
colMads(x)
colMedians, rowMedians, colVars, colmeans, colMeans (buit-in R function)
x <- matrix( rnorm(100 * 1000), ncol = 1000 ) system.time( a <- colMads(x) )
Run the code above in your browser using DataLab