View source: R/heatmap_cor_matrix.R
heatmap_cor_matrix | R Documentation |
This function generates a heatmap for a given correlation matrix. The heatmap uses a color gradient to represent values in the correlation matrix, with blue for negative values, white for neutral (zero), and red for positive values.
heatmap_cor_matrix(cor_matrix, title = "Heatmap")
cor_matrix |
A square numeric matrix representing correlations between variables. |
title |
A character string specifying the title of the heatmap. Default is "Heatmap". |
A ggplot2 object representing the heatmap of the correlation matrix.
# Example usage:
cor_matrix <- cor(mtcars)
heatmap_cor_matrix(cor_matrix, title = "Correlation Heatmap for mtcars")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.