title: Accessing elements returned by ego function in R
body: <p>I am using ego function to find the immediate neighbors of node <em>i</em>.</p>
  
  <pre><code>nbr &lt;- ego(graph1, 1, i)
  print(nbr)
  </code></pre>
  
  <p>The print statement outputs:</p>
  
  <pre><code>[[1]]
  + 4/1000 vertices:
  [1] 119 95 237 276
  </code></pre>
  
  <p>How can I access an integer from the list: 119 95 237 276?</p>