Skip to contents

Create square correlation matrix from lower triangle

Usage

tri2cor(x, variable_names = NULL)

Arguments

x

vector of correlations

variable_names

a vector of variable names

Value

square matrix

Examples

tri2cor(c(.2,.3,.4))
#>      [,1] [,2] [,3]
#> [1,]  1.0  0.2  0.3
#> [2,]  0.2  1.0  0.4
#> [3,]  0.3  0.4  1.0