My problem is that I want to assign values of correlations from a matrix to the thickness of areas in the Igraph package using R.
Here is my data
require(igraph)
links = (AI)# AI in a correlation matrix
links= as.matrix(AI)#coersÃo do data sete em uma matrix
matrixnetwork = graph.adjacency(links, mode="undirected", weighted = TRUE, add.colnames=NULL, diag=FALSE)
plot(matrixnetwork) #here I change to network for igraph
I try this form
edge.width=strength(matrixnetwork) *2.3 #Set node thickness using strength and match within the graph
edge.width=E(matrixnetwork)$weight*2.3#I set the thickness of the node using the graph's weight
I have this graph
In this case, the edges received either the strength or the weight, but I want them to have thickness corresponding to the weight of the correlations that I have in the "AI" variable, or the "Links" variable.