Closed mzachariou closed 3 years ago
Here are two examples.
M = cor(mtcars)
testRes = cor.mtest(mtcars, conf.level = 0.95)
## leave blank on no significant coefficient
## add significant correlation coefficients
corrplot(M, p.mat = testRes$p, method = 'circle', type = 'lower', insig='blank',
addCoef.col ='black', number.cex = 0.8, order = 'AOE', diag=FALSE)
## leave blank on no significant coefficient
## add all correlation coefficients
corrplot(M, p.mat = testRes$p, method = 'circle', type = 'lower', insig='blank',
order = 'AOE', diag=FALSE)$corrPos -> p1
text(p1$x, p1$y, round(p1$corr,2), cex=0.8)
Many thanks!
Hi there,
Using the following code with the previous versiou would generate a colored corrplot with all correlations printed and colors only for the significant ones (see attached). The same code in 0.9 version removes the correlation values for the not significant ones. How can I edit the code to generate plots as before?
corrplot(M, method="color", col=col_def(200), addgrid.col = "grey", addCoef.col = "black", # Add coefficient of correlation tl.col="black", tl.srt=45, #Text label color and rotation
Combine with significance
)
Many thanks
Margarita. test.pdf