Utility functions in optimbase meant to check variable class. Stop the algorithm if the variable is not of the expected class.
assert.classbooleanfor logical variables
assert.classfunctionfor functions
assert.classrealfor numeric variables
assert.classintegerfor integer variables
assert.classstringfor character variables
unknownValueForOption stops the algorithm and returns an error
message, when some checks in optimbase are not successful.
assert.classboolean(var = NULL, varname = NULL, ivar = NULL)
assert.classfunction(var = NULL, varname = NULL, ivar = NULL)
assert.classreal(var = NULL, varname = NULL, ivar = NULL)
assert.classinteger(var = NULL, varname = NULL, ivar = NULL)
assert.classstring(var = NULL, varname = NULL, ivar = NULL)
unknownValueForOption(value = NULL, optionname = NULL)The variable name.
The name of a variable to which var should have been
assigned to.
A integer, meant to provide additional info on varname in
the error message.
A numeric or a string.
The name of a variable for which value is unknown.
Return an error message through the stop function.