type: The type of heat map to produce. Either lower (default) to produce a lower triangle heat map or upper to produce an upper triangular heat map.
diag: Plot diagonal elements? Defaults to FALSE.
reorder: Reorder the correlation matrix to identify the hidden pattern? Defaults to TRUE.
signif: How to show significant correlations. If "stars" is used (default), stars are used showing the significance at 0.05 (""), 0.01 ("") and 0.001 ("") probability error. If signif = "pval", then the p-values are shown.
show: The correlations to show. Either all (default) or signif
(only significant correlations).
p_val: The p-value to the correlation significance.
caption: Logical. If TRUE (Default) includes a caption with the significance meaning for stars.
digits.cor, digits.pval: The significant digits to show for correlations and p-values, respectively.
col.low, col.mid, col.high: The color for the low (-1), mid(0) and high (1) points in the color key. Defaults to blue, white, and red, respectively.
lab.x.position, lab.y.position: The position of the x and y axis label. Defaults to "bottom" and "right" if type = "lower" or "top" and "left" if type = "upper".
legend.position: The legend position in the plot.
legend.title: The title of the color key. Defaults to "Pearson's Correlation".
size.text.cor: The size of the text for correlation values. Defaults to 3.
size.text.signif: The size of the text for significance values (stars or p-values). Defaults to 3.
size.text.lab: The size of the text for labels. Defaults to 10.
...: Currently not used.
Returns
An object of class gg, ggplot
Examples
library(metan)# All numeric variablesx <- corr_coef(data_ge2)plot(x)plot(x, reorder =FALSE)# Select variablessel <- corr_coef(data_ge2, EP, EL, CD, CL)plot(sel, type ="upper", reorder =FALSE, size.text.lab =14, size.text.plot =5)