Re: [R] Constructing a symmetric matrix with library(corpcor)

2016-02-21 Thread Jeff Newmiller
vec2sm( r, diag = FALSE, order=rr ) Next time please make an effort to post using plain text format, as your HTML-formatted email got rather messed up coming through this plain-text mailing list. You might find a reading of The R Inferno informative on the subject of F vs. FALSE. -- Sent fro

[R] Constructing a symmetric matrix with library(corpcor)

2016-02-21 Thread Steven Yen
I like to compose a symmetric matrix in the pattern as shown below (for 3 x 3 and 4 x 4). For a symmetric matrix of order 5, the result does not seem right. Help? It is possible to write a two-level do loop for the task, but I suppose that is less efficient. > library(corpcor)> r <- 1:3; r[1] 1 2