title: neighbors function in igraph package in R
body: <p>First of all I want to say that I already read answers for the question: "issues with R “igraph” package neighbor function" and I tried to solve my problem but I couldn't. I tried to ask my question as follow up comment but because of low level of reputation I couldn't, therefore I open this new question. Now here is my question:
  I have the same problem with neighbors function as it has been explained in:
  <a href="https://stackoverflow.com/questions/26932407/issues-with-r-igraph-package-neighbor-function">"igraph” package neighbor function</a> but when I try the solution which is given by <a href="https://stackoverflow.com/users/604364/gabor-csardi">Gabor Csardi</a> I just received null as result. I attached that part of my code here as well. I would be really thankful for any help and answer. 
  my table:</p>
  
  <pre><code>edgelist &lt;- read.table(text = "
  1 2
  2 3
  3 4
  4 5
  3 6
  6 7")
  library(igraph)
  graph &lt;- graph.data.frame(edgelist)
  
  str(graph)
  ## IGRAPH DN-- 7 6 -- 
  ## + attr: name (v/c)
  ## + edges (vertex names):
  ## [1] 1-&gt;2 2-&gt;3 3-&gt;4 4-&gt;5 3-&gt;6 6-&gt;7
  </code></pre>
  
  <p>now if I want the neighbors of the node 3 it should be </p>
  
  <pre><code>2, 4, 6
  </code></pre>
  
  <p>but the result I got is:</p>
  
  <pre><code>2, 4, 5
  </code></pre>
  
  <p>I  noticed it changed the order of my nodes. As I explained before I try the solution that I found in stack overflow but I got null as result:</p>
  
  <pre><code>graph$name[neighbors(graph, 3)]
     NULL
  </code></pre>
  
  <p>I don't know what else I can do,
  I would appreciate any help.</p>