lowertri2mat {changepoints} | R Documentation |
Transform a vector containing lower diagonal entries into a symmetric matrix of dimension p.
Description
Transform a vector containing lower diagonal entries into a symmetric matrix of dimension p.
Usage
lowertri2mat(lowertri_vec, p, diag = FALSE)
Arguments
lowertri_vec |
A |
p |
A |
diag |
A |
Value
A numeric
p x p symmetric matrix.
Author(s)
Haotian Xu
Examples
A = matrix(1:16, 4, 4)
B = lowertri2mat(A[lower.tri(A)], 4, diag = FALSE)
C = lowertri2mat(A[lower.tri(A, diag = TRUE)], 4, diag = TRUE)
[Package changepoints version 1.1.0 Index]