plot_correlation: Plot a correlation matrix of numerical variables

Description Usage Arguments Examples

Description

This function creates a nicely formatted, standardised correlation matrix of numerical variables. Long variables names should be shortened before for easier interpretation.

Usage

1
2
plot_correlation(df, method = "spearman", order = "alphabet",
  label_size = 0.7, number_size = 0.9)

Arguments

df

A data frame

method

A character string indicating which correlation coefficient (or covariance) is to be computed. One of "spearman" (default), "pearson" or "kendall": can be abbreviated

order

Ordering method of the correlation matrix. Recommended options are: "alphabet" (default) and "hclust"

label_size

Size of the text label. Defaults to 0.7

number_size

Size of the correlation number. Defaults to 0.9

Examples

1
2
recipes::credit_data %>%
    plot_correlation()

konradsemsch/aider documentation built on May 22, 2019, 2:40 p.m.