View source: R/cor_as_symbols.R
cor_as_symbols | R Documentation |
Take a correlation matrix and replace the correlation coefficients by symbols according to the level of the correlation.
cor_as_symbols( x, cutpoints = c(0, 0.25, 0.5, 0.75, 1), symbols = c(" ", ".", "+", "*") )
x |
a correlation matrix. Particularly, an object of class |
cutpoints |
numeric vector used for intervals. Default values are
|
symbols |
character vector, one shorter than cutpoints, used as
correlation coefficient symbols. Default values are |
cor_mat()
# Compute correlation matrix #:::::::::::::::::::::::::::::::::::::::::: cor.mat <- mtcars %>% select(mpg, disp, hp, drat, wt, qsec) %>% cor_mat() # Replace correlation coefficient by symbols #:::::::::::::::::::::::::::::::::::::::::: cor.mat %>% cor_as_symbols() %>% pull_lower_triangle()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.