How to convert list to graph object in R?
<p>I have adjacency list as shown here- <code>dput(data)</code></p>

<pre><code>list(c(2L, 3L, 5L, 6L, 7L, 8L, 9L, 11L, 12L, 13L, 14L, 18L, 22L, 
32L), c(1L, 3L, 4L, 8L, 14L, 18L, 20L, 31L), c(2L, 4L, 9L, 10L, 
14L, 28L, 29L, 33L), c(1L, 2L, 3L, 8L, 13L), c(1L, 7L, 11L), 
    c(1L, 11L, 17L), c(5L, 6L, 17L), c(1L, 3L, 4L), c(1L, 3L, 
    31L, 34L), c(3L, 34L, 33L), c(1L, 5L, 6L), c(1L, 32L, 23L
    ), c(1L, 4L, 2L), c(1L, 2L, 4L, 34L), c(33L, 34L, 29L), c(33L, 
    34L, 33L), c(6L, 7L, 19L), c(1L, 2L, 10L), c(33L, 34L, 14L
    ), c(1L, 2L, 34L), c(33L, 34L, 26L), c(1L, 2L, 15L), c(33L, 
    34L, 6L), c(26L, 28L, 33L, 34L), c(26L, 28L, 32L), c(24L, 
    25L, 32L), c(30L, 34L, 20L), c(3L, 24L, 34L), c(3L, 32L, 
    34L), c(24L, 27L, 33L), c(9L, 33L, 34L), c(1L, 25L, 26L, 
    33L), c(3L, 9L, 15L, 16L, 19L, 21L, 24L, 30L, 31L, 32L, 34L
    ), c(9L, 10L, 14L, 15L, 16L, 19L, 21L, 23L, 24L, 28L, 29L, 
    30L, 31L, 32L, 33L))
</code></pre>

<p>The list is similar to adjacency list and I wanted to convert it into igraph object in R. I have tried using<br>
  <code>graph_from_data_frame(data, directed = FALSE, vertices = NULL)</code><br>
but it is not working. I have also tried  </p>

<pre><code>graph_from_adj_list(data,mode="all",duplicate=FALSE) 
</code></pre>

<p>but this is giving wrong graph. For example <code>1-&gt; 2,3,5,6</code> should have edges as <code>1-&gt;2,1-&gt;3,1-&gt;5,1-6</code>; but it is giving random output as <code>1-&gt;3,2-&gt;5,3-&gt;6,2-&gt;6</code> ...likewise.<br>
 Any idea, how this could be done in R?</p>