vec2mat | R Documentation |
Fills a triangular matrix from the inputed vector
vec2mat(x,diag=FALSE,upper=FALSE)
x |
a vector |
diag |
whether the vector contains the diagonal elements |
upper |
whether the vector contains the upper trinagular matrix elements |
a matrix
{
vec2mat(1:10)
vec2mat(1:10,diag=TRUE)
vec2mat(1:10,upper=TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.