is.symmetric: Check whether a square matrix is symmetric

View source: R/is.R

Check whether a square matrix is symmetricR Documentation

Check whether a square matrix is symmetric

Description

Check whether a square matrix is symmetric.

Usage

is.symmetric(x)

Arguments

x

A square matrix with data.

Details

Instead of going through the whole matrix, the function will stop if the first disagreement is met.

Value

A boolean value, TRUE of FALSE.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

cholesky, cora, cova

Examples

x <-matrix( rnorm( 100 * 400), ncol = 400 )
s1 <- cor(x)
is.symmetric(s1)
x <- x[1:100, ]
is.symmetric(x)

x<-s1<-NULL

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.