| asserts {optimbase} | R Documentation |
Check of Variable Class
Description
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.
Usage
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)
Arguments
var |
The variable name. |
varname |
The name of a variable to which |
ivar |
A integer, meant to provide additional info on |
value |
A numeric or a string. |
optionname |
The name of a variable for which |
Value
Return an error message through the stop function.
Author(s)
Author of Scilab optimbase module: Michael Baudin (INRIA - Digiteo)
Author of R adaptation: Sebastien Bihorel (sb.pmlab@gmail.com)