This is a wrapper for Rbase which.max() which avoids warnings and errors when the supplied vector is empty or contains only NaNs

find_argmax(vec)

Arguments

vec

A numerical vector

Value

The index of the minimum (a number or NA)