Ensures that a variable respects several parameters
assert(x, len = NULL, cla = NULL, typ = NULL, alw = NULL, fun = "stop")
variable to test
integer vector of allowed length for x. Default is NULL, for not checking this parameter.
character vector of allowed classes of x. Default is NULL, for not checking this parameter.
character vector of allowed types of x. Default is NULL, for not checking this parameter.
allowed values for x. Default is NULL, for not checking this parameter.
function to execute when mandatory parameters are not met. Default is "stop". Allowed are "stop","warning","message","return".
/!\ alw parameter when used should be coercible to a logical, integer, numeric, complex or character vector. Otherwise, an error will be thrown.