powered by
Force a square matrix x to be symmetric
x
asSymmetric(x, lower = TRUE)
a square symmetric matrix.
a square matrix to be forced to be symmetric.
logical, should the upper (lower) triangle be replaced with the lower (upper) triangle?
a <- matrix(1:16, ncol = 4) isSymmetric(a) # FALSE a <- asSymmetric(a) # copy lower triangle into upper triangle
Run the code above in your browser using DataLab