Skip to content
Prev 156683 / 398506 Next

Symmetric matrix

try the following

a <- matrix(rnorm(36), 6)
ind <- lower.tri(a)
a[ind] <- t(a)[ind]
a


I hope it helps.

Best,
Dimitris
Megh Dal wrote: