View source: R/bcat_cor_table.R
| bcat_cor_table | R Documentation |
Produce a formatted correlation matrix with significance stars and UC styling. By default shows only the lower triangle.
bcat_cor_table(
df,
method = c("pearson", "spearman", "kendall"),
full_matrix = FALSE,
digits = 2,
stars = TRUE,
p_threshold = c(0.01, 0.05, 0.1),
caption = NULL,
font_size = 12,
header_bg_color = palette_UC[["UC Red"]],
header_txt_color = palette_UC[["White"]],
striped = TRUE,
doc_type = NULL,
...
)
df |
A data frame of numeric columns. |
method |
Character. Correlation method: |
full_matrix |
Logical. Show full matrix? Default is FALSE (lower triangle only). |
digits |
Integer. Decimal places. Default is 2. |
stars |
Logical. Show significance stars? Default is TRUE. |
p_threshold |
Numeric vector of p-value thresholds for stars.
Default: |
caption |
Character. Table caption. |
font_size |
Numeric. Font size. Default is 12. |
header_bg_color |
Background color for header. |
header_txt_color |
Text color for header. |
striped |
Logical. Zebra striping? |
doc_type |
Character. Force output format. Auto-detected if NULL. |
... |
Additional arguments passed to table formatting. |
A formatted table object.
Saannidhya Rawat
Other tables:
bcat_fmt_style_table(),
bcat_reg_table(),
bcat_sum_table()
bcat_cor_table(mtcars[, c("mpg", "wt", "hp", "disp")])
bcat_cor_table(mtcars[, c("mpg", "wt", "hp")], method = "spearman")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.