This function performs very basic range checks for numeric variables and throws an error if the range is violated. A custom hint may be added to the message.
.rangeCheck(variable, range, allowedEqual, hint = "")The (named) variable to be checked.
A vector of length 2 giving the minimum and maximum of the allowed range.
Logical. Are the borders of range valid values?
Additional message that may be printed after the error.