Determines the location, i.e. index, of the (first) minimum or maximum of
a numeric (or logical) vector.
Usage
which_min_gc(x, empty_NA = TRUE)
which_max_gc(x, empty_NA = TRUE)
Arguments
- x
numeric (logical, integer, or double) vector or an R object
for which the internal coercion to double works whose min or max
is searched for.
- empty_NA
logical, indicating if an empty value should be returned
as NA (the default) or as integer(0) (the
same as which.min and which.max).
Details
These functions are wrappers for which.min and which.max,
with the additional argument empty_NA.