Without going to the source code and pulling the relevant line of code, can someone explain how this is not an error?
a <- matrix(rnorm(50), nrow= 10, ncol= 5)
dim(apply(a, 2, function(j) return(j)))
# [1] 10 5
dim(apply(a, 1, function(j) return(j)))
# [1] 5 10
Why the unrequested transpose?