Annotate corrplot coefficient and significance without overlapping

Viewed 332

Is there a way to add the coefficient and the significance to the same correlation triangle using the CORRPLOT package, without the two overlapping, as in the figure below.

Example graphic, x vs y matrix with color coding

this is the code i used:

library(tidyverse)
library(corrplot)


dados <- read.table("Planilhacorre.txt",
                    na.strings = "NA",h=TRUE)

dados <- drop_na(dados)
matrix_corr <- cor(dados)

res1 <- cor.mtest(matrix_corr, conf.level = .95)
corrplot(matrix_corr, p.mat = res1$p, method = "color", diag = T, type = "lower",sig.level = c(.01, .05), pch.cex = 1, insig = "label_sig", pch.col = "red", order = "original",addCoef.col ='black',
tl.cex = 1, tl.col = "black",tl.srt = 1,
number.cex= .8)
0 Answers
Related