[ top | up ]

Find Maximum Position in Vector

Usage

which.is.max(x)

Arguments

x a numeric vector

Description

Ties are broken at random.

Value

the index of a maximal value.

See Also

max.col which does the same for each row of a matrix .

Examples

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))