powered by
colMins(x, value = FALSE) colMaxs(x, value = FALSE)
rowMins, rowMaxs, nth, colrange, colMedians, colVars, sort_mat
x <- matrix( rnorm(1000 * 2000), ncol = 2000 ) system.time( s1 <- colMins(x) ) system.time( s2 <- apply(x, 2, min) ) system.time( s1 <- colMaxs(x) ) system.time( s2 <- apply(x, 2, max) )
Run the code above in your browser using DataLab