Reflect upper/lower triangle across diagonal
Create a new matrix by copying the lower(upper) triangle to the other half.
reflect_triangle(m, from = c("lower", "upper"))
m |
a square matrix |
from |
lower or upper triangle |
a symmetric square matrix
x <- matrix(1:9,3,3) reflect_triangle(x, "lower") reflect_triangle(x, "upper")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.