| getMaxIndex {BBmisc} | R Documentation |
Return index of maximal/minimal/best element in numerical vector.
Description
If x is empty or only contains NAs which are to be removed,
-1 is returned.
Usage
getMaxIndex(x, weights = NULL, ties.method = "random", na.rm = FALSE)
getMinIndex(x, weights = NULL, ties.method = "random", na.rm = FALSE)
getBestIndex(x, weights = NULL, minimize = TRUE, ...)
Arguments
x |
[ |
weights |
[ |
ties.method |
[ |
na.rm |
[ |
minimize |
[ |
... |
[any] |
Value
[integer(1)].
Note
Function getBestIndex is a simple wrapper for getMinIndex or
getMaxIndex respectively depending on the argument minimize.
[Package BBmisc version 1.13 Index]