Description Usage Arguments Value Author(s) References Examples
View source: R/correlation.heatmap.R
Visualizes n x m correlation table as heatmap.
1 2 3 4 5 | correlation.heatmap(df, Xvar, Yvar, fill, star = "p.adj",
p.adj.threshold = 1, correlation.threshold = 0, step = 0.2,
colours = c("darkblue", "blue", "white", "red", "darkred"), limits = NULL,
legend.text = "", order.rows = TRUE, order.cols = TRUE,
text.size = 10, filter.significant = TRUE, star.size = NULL)
|
df |
Data frame. Each row corresponds to a pair of correlated variables. The columns give variable names, correlations and significance estimates. |
Xvar |
X axis variable column name. For instance 'X'. |
Yvar |
Y axis variable column name. For instance 'Y'. |
fill |
Column to be used for heatmap coloring. For instance 'correlation'. |
star |
Column to be used for cell highlighting. For instance 'p.adj'. |
p.adj.threshold |
Significance threshold for the stars. |
correlation.threshold |
Include only elements that have absolute correlation higher than this value |
step |
color interval |
colours |
heatmap colours |
limits |
colour scale limits |
legend.text |
legend text |
order.rows |
Order rows to enhance visualization interpretability |
order.cols |
Order columns to enhance visualization interpretability |
text.size |
Adjust text size |
filter.significant |
Keep only the elements with at least one significant entry |
star.size |
NULL Determine size of the highlight symbols |
ggplot2 object
Contact: Leo Lahti microbiome-admin@googlegroups.com
See citation('microbiome')
1 2 3 4 5 | data(peerj32)
d1 <- peerj32$lipids[, 1:10]
d2 <- peerj32$microbes[, 1:10]
cc <- cross.correlate(d1, d2)
p <- correlation.heatmap(cc, 'X1', 'X2', 'Correlation')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.