Description Usage Arguments Examples
This function creates a nicely formatted, standardised correlation matrix of numerical variables. Long variables names should be shortened before for easier interpretation.
1 2 | plot_correlation(df, method = "spearman", order = "alphabet",
label_size = 0.7, number_size = 0.9)
|
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 |
1 2 | recipes::credit_data %>%
plot_correlation()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.