## Specify the lower triangle covariances
## Can provide names for the variables
reshape_vec2mat(cov = c(.3, .2, .4), var_names = c("x", "y", "z"))
## Specify scalar values to repeat for the covariances and variances
reshape_vec2mat(cov = .3, var = 2, order = 3)
## Give a vector of variances to create a diagonal matrix
reshape_vec2mat(var = 1:5)
## Specify order only to create identity matrix
reshape_vec2mat(order = 3)
## Specify order and scalar variance to create a scalar matrix
reshape_vec2mat(var = 2, order = 3)
## A quick way to make a 2x2 matrix for bivariate correlations
reshape_vec2mat(cov = .2)
Run the code above in your browser using DataLab