Turns the tibble exported from correlate into a correlation matrix.

to_correlation_matrix(data)

Arguments

data

a tibble returned from correlate

Value

a tibble

Examples

WoJ %>% correlate() %>% to_correlation_matrix()
#> # A tibble: 11 x 12 #> r autonomy_select~ autonomy_emphas~ ethics_1 ethics_2 ethics_3 ethics_4 #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 autono~ 1 0.644 -0.0766 -0.0274 -0.0257 -0.0781 #> 2 autono~ 0.644 1 -0.114 -0.0337 -0.0297 -0.127 #> 3 ethics~ -0.0766 -0.114 1 0.172 0.165 0.343 #> 4 ethics~ -0.0274 -0.0337 0.172 1 0.409 0.321 #> 5 ethics~ -0.0257 -0.0297 0.165 0.409 1 0.273 #> 6 ethics~ -0.0781 -0.127 0.343 0.321 0.273 1 #> 7 work_e~ 0.161 0.155 -0.103 -0.168 -0.0442 -0.116 #> 8 trust_~ -0.00840 -0.00465 -0.0378 0.00161 -0.0486 -0.0632 #> 9 trust_~ 0.0414 0.0268 -0.102 0.0374 -0.0743 -0.0733 #> 10 trust_~ 0.0269 0.0102 -0.0472 0.0238 -0.0115 -0.0309 #> 11 trust_~ 0.0109 0.00242 -0.00725 0.0250 -0.0212 -0.00218 #> # ... with 5 more variables: work_experience <dbl>, trust_parliament <dbl>, #> # trust_government <dbl>, trust_parties <dbl>, trust_politicians <dbl>