Creating a symmetric matrix in R December 1, 2022 by Tarik s<-matrix(1:25,5) s[lower.tri(s)] = t(s)[lower.tri(s)]