asSymmetric | R Documentation |
Force a square matrix x
to be symmetric
asSymmetric(x, lower = TRUE)
x |
a square matrix to be forced to be symmetric. |
lower |
logical, should the upper (lower) triangle be replaced with the lower (upper) triangle? |
a square symmetric matrix.
a <- matrix(1:16, ncol = 4)
isSymmetric(a) # FALSE
a <- asSymmetric(a) # copy lower triangle into upper triangle
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.