is.symmetric.matrix {matrixcalc} | R Documentation |
This function returns TRUE of the argument is a numeric symmetric square matrix and FALSE otherwise.
is.symmetric.matrix(x)
x |
an R object |
TRUE or FALSE.
~~further notes~~ If the argument is not a numeric matrix, the function displays an error message and stops. If the argument is not a square matrix, the function displays an error message and stops.
Frederick Novomestky fnovomes@poly.edu
is.numeric.matrix
,
is.square.matrix
A <- matrix( c( 1, 2, 3, 4 ), nrow=2, byrow=TRUE ) is.symmetric.matrix( A ) B <- matrix( c( 1, 2, 2, 1 ), nrow=2, byrow=TRUE ) is.symmetric.matrix( B )