Vector allocation in a symmetric matrix
Vector allocation in a symmetric matrix.
squareform(x)
x |
An numverical vector whose size must be the one that matches the dimensions of the final matrix. See examples. |
The functions is written in C++ in order to be as fast as possible.
A symmetric matrix. The vector is allocated in the upper and in the lower part of the matrix. The diagonal is filled with zeros.
R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.
x <- rnorm(1) res<-squareform(x) ## OK x <- rnorm(3) res<-squareform(x) ## OK x <- rnorm(4) res<-squareform(x) ## not OK
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.