eda_variable_correlation: Display the correlation between the variables

eda_variable_correlationR Documentation

Display the correlation between the variables

Description

[Experimental]

Exports a plot of the correlation matrix for each variable into a temporary directory, showing the correlation values between each variable combination.

Usage

eda_variable_correlation(.dataset)

Arguments

.dataset

A data frame requiring exploratory data analysis.

Value

The data frame is returned invisibly so that the function can be used in a piped workflow.

Figures

08-correlation_plot.png

See Also

Other exploratory data analysis: eda_variable_collection(), eda_variable_distribution(), eda_variable_outliers(), eda_variable_summary()

Examples

# example from palmerpenguins
# https://allisonhorst.github.io/palmerpenguins/reference/penguins_raw.html
suppressPackageStartupMessages({
  suppressWarnings({
    library(palmerpenguins)
  })
})

suppressMessages({eda_variable_correlation(penguins_raw)})

# move figures from temporary directory
suppressPackageStartupMessages({
  suppressWarnings({
    library(fs)
    library(here)
  })
})

if(dir_exists(here("man", "figures"))) {
  file_move(path(tempdir(), "figures", "08-correlation_plot.png"),
            here("man", "figures", "08-correlation_plot.png"))
}

gcfrench/store documentation built on May 17, 2024, 5:52 p.m.