plot.corr_coef | R Documentation |
Create a correlation heat map for object of class corr_coef
## S3 method for class 'corr_coef' plot( x, type = "lower", diag = FALSE, reorder = TRUE, signif = c("stars", "pval"), show = c("all", "signif"), p_val = 0.05, caption = TRUE, digits.cor = 2, digits.pval = 3, col.low = "red", col.mid = "white", col.high = "blue", lab.x.position = NULL, lab.y.position = NULL, legend.position = NULL, legend.title = "Pearson's\nCorrelation", size.text.cor = 3, size.text.signif = 3, size.text.lab = 10, ... )
x |
The data set. |
type |
The type of heat map to produce. Either |
diag |
Plot diagonal elements? Defaults to |
reorder |
Reorder the correlation matrix to identify the hidden pattern?
Defaults to |
signif |
How to show significant correlations. If |
show |
The correlations to show. Either |
p_val |
The p-value to the correlation significance. |
caption |
Logical. If |
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 |
lab.x.position, lab.y.position |
The position of the x and y axis label.
Defaults to |
legend.position |
The legend position in the plot. |
legend.title |
The title of the color key. Defaults to |
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. |
An object of class gg, ggplot
Tiago Olivoto tiagoolivoto@gmail.com
library(metan) # All numeric variables x <- corr_coef(data_ge2) plot(x) plot(x, reorder = FALSE) # Select variables sel <- corr_coef(data_ge2, EP, EL, CD, CL) plot(sel, type = "upper", reorder = FALSE, size.text.lab = 14, size.text.plot = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.