Checks the class and values of a scalar

check_scalar(scalar, value, scalar_name = substitute(scalar))

Arguments

scalar

The scalar to check.

value

A vector specifying the class and value.

scalar_name

A string of the name of vector.

Value

Throws an informative error or returns an invisible copy of the scalar.