cormat_from_triangle makes a correlation matrix from a vector of the upper right triangle

cormat_from_triangle(cors)

Arguments

cors

the correlations among the variables as a vars\*(vars-1)/2 vector

Value

matrix

Examples

cormat_from_triangle(c(.2, .3, .4, 
                           .5, .6, 
                               .7))
#>      [,1] [,2] [,3] [,4]
#> [1,]  1.0  0.2  0.3  0.4
#> [2,]  0.2  1.0  0.5  0.6
#> [3,]  0.3  0.5  1.0  0.7
#> [4,]  0.4  0.6  0.7  1.0