is_symmetric {xnet} | R Documentation |
The function isSymmetric
tests for symmetry of a matrix but also
takes row and column names into account. This function is a toned-down
(and slightly faster) version that ignores row and column names.
Currently, the function only works for real matrices, not complex ones.
is_symmetric(x, tol = 100 * .Machine$double.eps)
x |
a matrix to be tested. |
tol |
the tolerance for comparing the numbers. |
a logical value indicating whether or not the matrix is symmetric
x <- matrix(1:16,ncol = 4)
is_symmetric(x)
x <- x %*% t(x)
is_symmetric(x)