plot_correlation: Plot a correlation matrix of numerical variables

Description Usage Arguments Examples

View source: R/plot_correlation.R

Description

This function creates a nicely formatted, standardised correlation matrix of numerical variables. Make sure that long variables names are are shortened before using the function for easier interpretation.

Usage

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

Arguments

df

A data frame.

method

A character string indicating which correlation coefficient (or covariance) should be computed. Options are: "spearman" (default), "pearson" or "kendall".

order

Ordering method of the correlation matrix. 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

konradsemsch/ggrapid documentation built on Nov. 4, 2019, 3:56 p.m.