Determines the location, i.e. index, of the (first) minimum or maximum of a numeric (or logical) vector.
which_min_gc(x, empty_NA = TRUE)which_max_gc(x, empty_NA = TRUE)
If empty_NA = FALSE
, identical to which.min
or
which.max
If empty_NA = TRUE
, identical to which.min
or
which.max
except that, in cases where which.min
or
which.max
would return integer(0)
, which_min_gc
and
which_max_gc
return NA
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.
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
).
These functions are wrappers for which.min
and which.max
,
with the additional argument empty_NA
.