data_cor | R Documentation |
The function data_cor
takes a data frame and plots the pairwise Pearson's correlation coefficients of all continuous variables.
data_cor(data, digits = 3, plot = TRUE, diag.off = TRUE,
lower.tri.off = FALSE, method = c("square", "circle"),
outline.color = "gray", colors = c("blue", "white", "red"),
legend.title = "Corr", title, ggtheme = theme_minimal(),
tl.cex = 12, tl.col = "black", tl.srt = 45, lab = TRUE,
lab_col = "black", lab_size = 3, circle.size = 20)
data |
a data frame |
digits |
the digits for printing the correlation coefficients |
plot |
whether to plot or not |
diag.off |
whether to show the diagonal ellements |
lower.tri.off |
whether to show the lower part of the matrix |
method |
plotting in |
outline.color |
the outline colour |
colors |
the range of colours |
legend.title |
title for the legend |
title |
the main tittle |
ggtheme |
the theme for the plot, see package ggthemes for more themes |
tl.cex |
the text size for the marginal labels |
tl.col |
the colour of the he marginal labels |
tl.srt |
the angle of the text in the bottom labels of the table |
lab |
whether to show the correlation coefficients in the table |
lab_col |
the colour of the lettering of the correlation coefficients |
lab_size |
the size of the lettering of the correlation coefficients, increase (or decrease) if the defaul 3 is not appropriate |
circle.size |
the size of the circles, increase (or decrease) if the defaul 20 is not appropriate |
creates a plot
Mikis Stasinopoulos
Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/9780429298547")}.
Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/b21973")}
mcor
data_cor(rent)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.