corrplot画图

##(六)描述统计(画图)
library("corrplot")
library("dplyr")
##(1)画图:混合方法之上三角为圆形,下三角为数字
coroutput <-cor(newdata[,c("a15","a285","gender","age","hunyin","lnincome_fam","edu","a35","v458","a36")])
coroutput

colnames(coroutput)<-c("自评健康","互联网","性别","年龄","婚姻","收入","教育","社会评价","社会信任","幸福感")
rownames(coroutput)<-c("自评健康","互联网","性别","年龄","婚姻","收入","教育","社会评价","社会信任","幸福感")

corrplot(coroutput,order = "AOE",type="upper",tl.pos = "d") 
corrplot(coroutput,add=TRUE, type="lower", method="number",order="AOE",diag=FALSE,tl.pos="n", cl.pos="n") 

##(2)画图:上三角为圆形  #tl.pos = "lt",变量名称在左边中间或者不显示。
corrplot(coroutput,method="color",  
         type="upper", order="original", 
         addCoef.col = "black",tl.col = "black",tl.srt=45,diag=FALSE,) 

上一篇:【C语言】so的编译和链接情况


下一篇:MSDN Library - October 2001 精简方法