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