library(readxl)
library(ggcorrplot)
library(ggthemes)
data <- read_xlsx("correlation2.xlsx",sheet = 2)
data<-as.data.frame(data)
rownames(data)<-data$id
data<-data[,-1]
corr<-round(cor(t(data)),3)
p.mat<-round(cor_pmat(t(data)),3)
ggcorrplot(corr)
ggcorrplot(corr,method = "circle")
ggcorrplot(corr,method = "circle",
hc.order = T,hc.method = "ward.D",
outline.col = "white",ggtheme = theme_bw(),
type = "upper",
colors = c("#6D9EC1","white","#E46726"),
lab=T,lab_size = 2,
p.mat = p.mat,insig = "blank")
暂无评论