The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
ggcorrheatmap is a convenient package for generating correlation heatmaps made with ggplot2, with support for triangular layouts, clustering and annotation. As the output is a ggplot2 object you can further customise the appearance using familiar ggplot2 functions. Besides correlation heatmaps, there is also support for making general heatmaps.
You can install ggcorrheatmap from CRAN using:
install.packages("ggcorrheatmap")
Or you can install the development version from GitHub with:
# install.packages("devtools")
::install_github("leod123/ggcorrheatmap") devtools
Below is an example of how to generate a correlation heatmap with clustered rows and columns and row annotation, using a triangular layout that excludes redundant cells.
library(ggcorrheatmap)
set.seed(123)
# Make a correlation heatmap with a triangular layout, annotations and clustering
<- data.frame(.names = colnames(mtcars),
row_annot annot1 = sample(letters[1:3], ncol(mtcars), TRUE),
annot2 = rnorm(ncol(mtcars)))
ggcorrhm(mtcars, layout = "bottomright",
cluster_rows = TRUE, cluster_cols = TRUE,
show_dend_rows = FALSE, annot_rows_df = row_annot)
Or a mixed layout that displays different things in the different triangles.
# With correlation values and p-values
ggcorrhm(mtcars, layout = c("topright", "bottomleft"),
cell_labels = c(FALSE, TRUE), p_values = c(FALSE, TRUE))
It is also possible to make a normal heatmap, for a more flexible output.
gghm(scale(mtcars), cluster_rows = TRUE, cluster_cols = TRUE)
There are many more options for customisation, covered in the different articles of the package:
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.