which.is.max(x)
x
max.col
which.is.max(c(3,1,4,1,5,9,2,6,5)) ##-- pred <- predict(nnet, test) table(true, apply(pred,1,which.is.max))