\Header{which.is.max}{Find Maximum Position in Vector}
\keyword{utilities}{which.is.max}
\begin{Description}\relax
Find the maximum position in a vector, breaking ties at random.\end{Description}
\begin{Usage}
\begin{verbatim}
which.is.max(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a vector

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Ties are broken at random.\end{Details}
\begin{Value}
index of a maximal value.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{max.col}} in library MASS.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

pred <- predict(nnet, test)
table(true, apply(pred,1,which.is.max))
\end{ExampleCode}
\end{Examples}

