Utility function to check whether an object belongs to a particular class. Wrapper function over .check_class needed because, being called from .are_valid_argument_values, the parameter name will not be the same as the one from the original function.

.check_class_parameter_name(object, proper_class, parameter_name, mode = "any")

Arguments

object

An object whose class needs checking,

proper_class

A string describing the desired class of object.

parameter_name

A string containing the name the tested parameter had in the initial function in which it was passed.

mode

Optional. A string describing the desired mode of object. Use only if proper_class is vector. Mode cannot be Date. Use proper_class = "Date" for checking class of Date vector.

Value

TRUE if all tests were passed. Throws an error otherwise.