This function checks whether an object is_numeric_scalar(). If the check
fails, a formatted error is raised using cli::cli_abort().
Value
Invisibly returns TRUE on check pass. Throws a error of class
rlang::rlang_error on check fail.
Examples
check_numeric_scalar(5) # passes
check_numeric_scalar(0.1) # passes
if (FALSE) { # \dontrun{
check_numeric_scalar(NA) # throws error
check_numeric_scalar(NULL) # throws error
check_numeric_scalar(c(1,2)) # throws error
check_numeric_scalar("5") # throws error
} # }