heatmap_cor_matrix: Heatmap for Correlation Matrix

View source: R/heatmap_cor_matrix.R

heatmap_cor_matrixR Documentation

Heatmap for Correlation Matrix

Description

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.

Usage

heatmap_cor_matrix(cor_matrix, title = "Heatmap")

Arguments

cor_matrix

A square numeric matrix representing correlations between variables.

title

A character string specifying the title of the heatmap. Default is "Heatmap".

Value

A ggplot2 object representing the heatmap of the correlation matrix.

Examples

# Example usage:
cor_matrix <- cor(mtcars)
heatmap_cor_matrix(cor_matrix, title = "Correlation Heatmap for mtcars")

himelmallick/MimESys documentation built on April 13, 2025, 9:06 p.m.