Tri2M {MCMCglmm} | R Documentation |
Lower/Upper Triangle Elements of a Matrix
Description
Lower/Upper triangle elements of a matrix or forms a matrix from a vector of lower/upper triangle elements
Usage
Tri2M(x, lower.tri = TRUE, reverse = TRUE, diag = TRUE)
Arguments
x |
Matrix or vector |
lower.tri |
If |
reverse |
logical: if |
diag |
logical: if |
Value
numeric or matrix
Author(s)
Jarrod Hadfield j.hadfield@ed.ac.uk
Examples
M<-rIW(diag(3), 10)
x<-Tri2M(M)
x
Tri2M(x, reverse=TRUE)
Tri2M(x, reverse=FALSE)
[Package MCMCglmm version 2.36 Index]