cor_plot | R Documentation |
Get correlation between columns
cor_plot(
dt_cor,
col = c(low = "blue", high = "red", mid = "white", na.value = "white"),
limit = c(ifelse(min(dt_cor$Cor, na.rm = TRUE) < 0, -1, 0), 1),
midpoint = mean(limit),
label_name = "Pearson\nCorrelation",
text_size = 4,
legend.position = c(0.4, 0.7),
legend.direction = "horizontal"
)
dt_cor |
a data.table, with column Cor |
col |
colors c(low = "blue", high = "red", mid = "white", na.value = "white") |
limit |
default (-1, 1), defined by:
|
midpoint |
midpoint of correlation values in label coloring. |
label_name |
name of correlation method, default
|
text_size |
size of correlation numbers |
legend.position |
default c(0.4, 0.7), other: "top", "right",.. |
legend.direction |
default "horizontal", or "vertical" |
a ggplot (heatmap)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.