View source: R/cor_matrix_kbl.R
cor_matrix_kbl | R Documentation |
This function creates a kable correlation matrix with colored cells indicating effect size and significance. Cells are darker green with increasing positive effect size and darker red with increasing negative effect size. Non-significant cells are not colored.
cor_matrix_kbl( dat, column_grid = NULL, alpha = 0.05, get_df = FALSE, round_digits = 3 )
dat |
dataframe: data |
column_grid |
dataframe: first two columns contain the names of pairwise variables found in dat |
alpha |
numeric: p-value cutoff at which to start coloring cells |
data(mtcars) size_columns <- c("hp", "wt") power_columns <- c("hp", "qsec") col_grid <- expand.grid(size_columns, power_columns) cor_matrix_kbl(mtcars, col_grid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.