Determines the location, i.e., index of the (first) minimum or maximum of a numeric vector.
NaN values are discarded.
integer of length 1 or 0 (iff
x has no non-
NAs), giving the index of the first minimum or maximum respectively of
arrayInd(), if you need array/matrix indices instead of 1D vector ones.
which.is.max in package nnet differs in breaking ties at random (and having a ‘fuzz’ in the definition of ties).
Documentation reproduced from R 3.0.1. License: GPL-2.