Description Usage Arguments Examples
View source: R/plot_correlation.R
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.
1 2 | plot_correlation(df, method = "spearman", order = "alphabet",
label_size = 0.7, number_size = 0.7)
|
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. |
1 2 | diamonds %>%
plot_correlation()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.