visualize_correlations: Visualize the correlation matrix

View source: R/visualize.R

visualize_correlationsR Documentation

Visualize the correlation matrix

Description

Visualize the correlation matrix

Usage

visualize_correlations(
  df,
  color_value_positive = "#08306B",
  color_value_negative = "#8b0000",
  color_text = "#FFFFFF",
  include_missings = FALSE,
  ...
)

Arguments

df

data.frame containing columns for x and y

color_value_positive

color used for upper limit of gradient (high positive correlation)

color_value_negative

color used for lower limit of gradient (high negative correlation)

color_text

color used for text, best to pick high contrast with color_value_high

include_missings

bool, whether to include the variables without correlation values in the plot

...

arguments to pass to stats::cor()

Value

a ggplot object, a heatmap visualization

Examples

visualize_correlations(iris)

ppsr documentation built on June 22, 2024, 7:15 p.m.