title: igraph (R) How to create correlation network with only strong r values
body: <p>I am trying to figure out how to use graph.adjacency to create a graph using a correlation matrix (values -1 to 1), but only having the most strongly correlated edges included in the graph file, ie &lt;-.8 or >.8</p>
  
  <p>Here is the code that successfully gives me the network with the full data set: </p>
  
  <pre><code>corrdata&lt;-read.csv("spearmancorr.csv",header=FALSE)
  cor_mat&lt;-as.matrix(corrdata)
  diag(cor_mat)&lt;-0
  graph&lt;-graph.adjacency(cor_mat,weighted=TRUE,mode="lower")
  </code></pre>
  
  <p>I tried using delete.edges to reduce the network to at least >.8 to test it out, but the resulting file still shows edge weights below 0.8</p>
  
  <pre><code>graph.copy &lt;- delete.edges(graph, which(E(graph)$weight !&lt;0.8)-1)
  write.graph(graph.copy, file="gsig80.graphml", format="graphml")
  </code></pre>
  
  <p>Any advice on how to get the graph file I want?</p>