First of all, I have to say that I am new to R, and my first impression is very good, so I am determined to become proficient in it. Well, I have a simple undirected graph in the package 'igraph', and I want to generate all subsets of its edges. I have seen two functions that do that, one being 'combn', from the package 'combinat', and the other one being 'set_combn', from the package 'sets' (if I remember correctly). However, none of them does what I want, and I don't quite understand what is happenning. More precisely, my graph has the following edge list: (1,2), (1,3), (2,3).
Now, I want to generate all the subsets with two edges, and I call the function 'combn' as follows: combn(mylist, 2). The result is an array that contains pairs of vertices (it should be pairs of edges, I think), and moreover, there are repeated pairs.
On the other hand, if I call set_combn(mylist,2), it gives the following result: {{1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}}, which is also incorrect, right?
Any help, please?