Check whether provided arguments satisfy expectations.
Arguments
- x
scalar, vector, matrix, or array to be checked
- type
character
"numeric","integer","nominal", or"logical"- dim
dimensionality:
dim = 1for a scalar,dim = Inffor a vector of arbitrary length,dim = c(Inf, Inf)for a matrix of arbitrary dimensions,dim = c(Inf, Inf, Inf)for an array of arbitrary dimensions,dim = 100for a vector of length 100,dim = c(Inf, 100)for a matrix with 100 columns, etc.- na.rm
logical;
FALSE: missing values are not allowed,TRUE: missing values are allowed- support
character vector (only used for
type = "nominal")- min
numerical value (not used for
type = "nominal")- max
numerical value (not used for
type = "nominal")
Details
This function is called by multiple function of the corila-package.
See also
The function .validate() verifies whether the main arguments
have compatible dimensions (number of samples and features).
Examples
corila:::.assert(x = NULL)
corila:::.assert(x = rnorm(1), type = "numeric")
corila:::.assert(x = "A", type = "nominal", support = LETTERS)