Check if an argument is a matrix with contiguity matrix properties.
Usage
checkContiguityMatrix(
x,
isComplete = TRUE,
any.missing = FALSE,
all.missing = FALSE,
nrows = NULL,
ncols = nrows
)
assertContiguityMatrix(
x,
isComplete = TRUE,
any.missing = FALSE,
all.missing = FALSE,
nrows = NULL,
ncols = nrows,
.var.name = checkmate::vname(x),
add = NULL
)
testContiguityMatrix(
x,
isComplete = TRUE,
any.missing = FALSE,
all.missing = FALSE,
nrows = NULL,
ncols = nrows
)Arguments
- x
Matrix to be tested
- isComplete
A flag set to
TRUEifxis supposed to be a distance matrix of a complete set, i.e. must be symmetric with 0 at the diagonal (can be NA ifany.missing = TRUE).- any.missing
Are missing values allowed? Default is
FALSE.- all.missing
Are matrices with only missing values allowed? Default is
FALSE.- nrows, ncols
exact number of rows and columns. If
NULLcheck is ignored. IfisCompleteisTRUEthennrowsmust be equals toncols- .var.name
Name of the checked object to print in assertions. Defaults to the heuristic implemented in
checkmate::vname().- add
Collection to store assertion messages. See checkmate::AssertCollection.
Value
Please see checkmate::checkMatrix() help page (for instance)
for further details about the difference between check_, test_ and assert_
functions results.
See also
Other arguments checkers:
checkContiguityGraph(),
checkDistanceMatrix(),
checkPartition(),
checkRegionalisation()
