which.is.max: Find Maximum Position in Vector

Description Usage Arguments Details Value References See Also Examples

View source: R/nnet.R

Description

Find the maximum position in a vector, breaking ties at random.

Usage

1

Arguments

x

a vector

Details

Ties are broken at random.

Value

index of a maximal value.

References

Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.

See Also

max.col, which.max which takes the first of ties.

Examples

1
2
3
4
5
## Not run: ## this is incomplete
pred <- predict(nnet, test)
table(true, apply(pred, 1, which.is.max))

## End(Not run)

nnet documentation built on May 3, 2021, 5:09 p.m.

Related to which.is.max in nnet...