powered by
Checks that the input is a symmetric matrix.
assert_is_symmetric_matrix(x, tol = 100 * .Machine$double.eps, ..., severity = getOption("assertive.severity", "stop"))is_symmetric_matrix(x, tol = 100 * .Machine$double.eps, .xname = get_name_in_parent(x), ...)
is_symmetric_matrix(x, tol = 100 * .Machine$double.eps, .xname = get_name_in_parent(x), ...)
Input to check.
Differences smaller than tol are not considered.
tol
Passed to all.equal.
all.equal
How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".
"stop"
"warning"
"message"
"none"
Not intended to be used directly.
TRUE if the input is symmetric (after coercion to be a matrix).
TRUE
# NOT RUN { m <- diag(3); m[3, 1] <- 1e-100 assert_is_symmetric_matrix(m) #These examples should fail. assertive.base::dont_stop(assert_is_symmetric_matrix(m, tol = 0)) # }
Run the code above in your browser using DataLab