is.symmetric: Symmetric Matrix

Description Usage Arguments Value Author(s) Examples

View source: R/is.R

Description

Checks if a matrix is symmetric.

Usage

1

Arguments

X

Numeric matrix. A p \times p matrix.

stop

Logical. If TRUE, stops and returns an error with any of the following conditions: X is not a square matrix or X is not a symmetric matrix.

Value

Returns FALSE, if the X is not square and not symmetric. Returns TRUE, if the X is symmetric.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

1
2
3
4
5
6
7
8
9
Sigma <- matrix(
  data = c(
    225, 112.50, 56.25,
    112.5, 225, 112.5,
    56.25, 112.50, 225
  ),
  ncol = 3
)
is.symmetric(X = Sigma)

jeksterslabds/jeksterslabRmatrix documentation built on Aug. 4, 2020, 5:18 a.m.