I want to make a network-like the figure below, based on a correlation matrix (c). Where, edge type, size and color is based on strength of correlation (we can make three distinctions, high positive, high negative and one in between) and the pie within each node (red and green color) based on a two (NP) column vector (on column with total positive correlation for a variable and other with negative correlation).
Some random variables
DD<- matrix(NA, 1000, 6)
for (i in 1:6){
DD[,i]=runif(1000)
}
Their correlation and sums
C=cor(DD)
diag(C)<- 0
NP<- matrix(NA, 6, 2)
NP[,1]<-rowSums(C < 0,na.rm=TRUE)
NP[,2]<-rowSums(C > 0,na.rm=TRUE)
Thanks for the help.