If x
is empty or only contains NAs which are to be removed,
-1 is returned.
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, ...)
[integer(1)
].
[numeric
]
Input vector.
[numeric
]
Weights (same length as x
).
If these are specified, the index is selected from x * w
.
Default is NULL
which means no weights.
[character(1)
]
How should ties be handled?
Possible are: “random”, “first”, “last”.
Default is “random”.
[logical(1)
]
If FALSE
, NA is returned if an NA is encountered in x
.
If TRUE
, NAs are disregarded.
Default is FALSE
[logical(1)
]
Minimal element is considered best?
Default is TRUE
.
[any]
Further arguments passed down to the delegate.