Check if an argument is a distance matrix
Usage
checkDistanceMatrix(
x,
isComplete = TRUE,
any.missing = FALSE,
all.missing = FALSE
)
assertDistanceMatrix(
x,
isComplete = TRUE,
any.missing = FALSE,
all.missing = FALSE,
.var.name = checkmate::vname(x),
add = NULL
)
testDistanceMatrix(
x,
isComplete = TRUE,
any.missing = FALSE,
all.missing = FALSE
)
Arguments
- x
Matrix to be tested
- isComplete
A flag set to
TRUE
ifx
is 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
.- .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()
,
checkContiguityMatrix()
,
checkPartition()
,
checkRegionalisation()