I need to graphically represent a network from a symmetric matrix nxn, composed by edge values that go from 0 to 1 (like 0.1, 0.22, 0.54,etc). I would like to represent only the strongest edge connections, say above 0.6.
I share my code:
m=as.matrix(matrix3)
g <- graph_from_adjacency_matrix(m, mode = "upper", weighted = T, diag = F)
new_graph <- induced.subgraph(m, E(m)[E(m)$weight %in% c(E(m)$weight > 0.6 )])
ggnet2(new_graph)
It does not work. Any suggestion to plot only connections above the 0.6 threshold?
your data
Transform into matrix
Set up graph object
Delete edges below 0.6
Plot your graph with edges above 0.6