prepare_correlation_graph {ExPanDaR}R Documentation

Prepares a Correlation Graph

Description

Reads a data frame and presents Pearson correlations above and Spearman correlations the diagonal using a fancy graph prepared by the package corrplot.

Usage

prepare_correlation_graph(df)

Arguments

df

Data frame containing at least two variables that are either numeric or logical and at least five observations.

Value

The function directly renders the graph as produced by corrplot. In addition, it returns a list containing three items:

"df_corr"

A data frame containing the correlations

"df_prob"

A data frame containing the p-values of the correlations

"df_n"

A data frame containing the number of observations used for the correlations

Examples

prepare_correlation_graph(mtcars)

[Package ExPanDaR version 0.5.3 Index]