Given the following matrix lets assume I want to find the maximum value in column two:
mat <- matrix(c(1:3,7:9,4:6), byrow = T, nc = 3) mat [,1] [,2]
See ?order. You just need the last index (or first, in decreasing order), so this should do the trick:
?order
order(matrix[,2],decreasing=T)[1]