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

find_max(vec)

Arguments

vec

A numerical vector

Value

The maximum (a number or NA)