What is the fastest way to extract the min from each column in a matrix?
Moved all the benchmarks to the answer below.
lapply( split(mat, rep(1:dim(mat)[1], each=dim(mat)[2])), min) which( ! apply(my.mat, 2, min, na.rm=T) == sapply( split(my.mat, rep(1:dim(my.mat)[1], each=dim(my.mat)[2])), min) ) # named integer(0)