I have following matrix :

a = matrix(rnorm(36), 6)

Now I want to replace the lower-triangular elements with it's upper-triangular 
elements. That is I want to make a symmetric matrix from a. I have tried with 
lower.tri() and upper.tri() function, but got desired result. Can anyone please 
tell me how to do that?

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to