Format text of a correlation matrix
Arguments
- r
a matrix of correlations
- digits
Number of digits to round
- remove_leading_zero
If TRUE, remove leading zero from all correlations
- remove_diagonal
If TRUE, remove diagonal of ones
Examples
cor_text(matrix(.5,2,2))
#> [,1] [,2]
#> [1,] "1" ".50"
#> [2,] ".50" "1"