powered by
Fills a triangular matrix from the inputed vector
vec2mat(x,diag=FALSE,upper=FALSE)
a vector
whether the vector contains the diagonal elements
whether the vector contains the upper trinagular matrix elements
a matrix
# NOT RUN { { vec2mat(1:10) vec2mat(1:10,diag=TRUE) vec2mat(1:10,upper=TRUE) } # }
Run the code above in your browser using DataLab