欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

R语言相关性绘图

程序员文章站 2022-03-03 10:20:05
...
library('corrplot')
fivecol

colnames(fivecol) <- c( 'D0','D1','D2','D3','D4','D5','D6','D7','D8','D9') 

matrix <- cor (fivecol)

#直接画图,不设置其它参数
corrplot(corr=matrix)


corrplot(matrix, p.mat = res1$p, tl.pos = "d",type ="lower",insig = "label_sig",
         sig.level = c(.005, .01, .05), pch.cex = .9,
         pch.col = "black", order = "AOE")

corrplot(matrix, add = TRUE, type = "upper", method = "circle", diag = FALSE, tl.pos = "n", cl.pos = "n")

order = "AOE"删除
res1 <- cor.mtest(matrix)

`sim` <- read.csv("E:/Githubresponsity/YEDDA/LDA/10X10sim.csv", header=TRUE)

matrix

simdata=as.matrix(sim)

corrplot(simdata, add = TRUE, type = "upper", method = "number"
         , diag = FALSE
         , tl.pos = "n", cl.pos = "n")