Validates that the argument is numeric. Fail quietly if NA_real_

validate_numeric(x, min = -Inf, max = Inf, .fun_name = NULL)

Arguments

x

Variable to check

min

Minimum value allowed (inclusive) (default -Inf)

max

Maximum value allowed (inclusive) (default +Inf)

.fun_name

A string containing the name of the calling to use as a prefix in the warning. Default is NULL

Value

TRUE if passes checks, FALSE otherwise. Generates warnings.