Попытка сложить значения коэффициентов (нижний угол) и значимость (верхний угол)
Попробуйте использовать corrplot.mixed, но делаете что-то не так
library(corrplot)
library(Hmisc)
mydata <- read.csv("HiBAPPaperv2_Corre.csv")
mydata.cor = cor(mydata, method = "pearson")
mydatrou= round(mydata.cor, 2)
H1517 <- cor(mydatrou)
#corrplot(H1517, method = "circle")
H1517_2 <- rcorr(as.matrix(mydata))
# Extract the correlation coefficients
H1517_2$r
# Extract p-values
H1517_2$P
## add all p-values
col1 <- colorRampPalette(c("#7F0000", "red", "#FF7F00", "yellow", "white",
"#00ff11", "#007FFF", "blue", "#00007F"))
col2 <- colorRampPalette(c("#67001F", "#B2182B", "#D6604D", "#F4A582",
"#FDDBC7", "#FFFFFF", "#D1E5F0", "#92C5DE",
"#4393C3", "#2166AC", "#053061"))
col3 <- colorRampPalette(c("red", "white", "blue"))
col4 <- colorRampPalette(c("#7F0000", "red", "#FF7F00", "yellow", "#7FFF7F",
"#00ff11", "#007FFF", "blue", "#00007F"))
whiteblack <- c("white", "black")
## using these color spectra
corrplot.mixed(H1517, upper = "square", p.mat = H1517_2$P, insig = "label_sig", addrect = 3,col = col4(10), sig.level = c(.001, .01, .05), pch.cex = 1,
lower = "number", tl.pos = "lt", tl.col = "black", tl.offset=1, tl.srt = 0)
Невозможно построить график из-заto: Ошибка в corrplot (corr, type = "upper", метод = upper, diag = TRUE, tl.pos = tl.pos,: формальный аргумент "col", совпадающий с несколькими фактическими аргументами