Thank Tamas,

I am trying:
expand.grid(neighbors(g,1))

where i is a vertex, but all I got is like:

>               print(neighbors(g,1))
 [1]  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
>               print(expand.grid(neighbors(g,1)))
   Var1
1     2
2     3
3     4
4     5
5     6
6     7
7     8
8     9
9    10
10   11
11   12
12   13
13   14
14   15
15   16
16   17
17   18
18   19
19   20
20   21
21   22
22   23
23   24

is there something I am missing?

Best,
Simone

2013/2/1 Tamás Nepusz <[email protected]>:
>> is there any combinations() in r? something that explore all possible
>> combinations in a vector - as far as I have understood it...
> expand.grid could be the function you are looking for.
>
> --
> T.
>
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Simone Gabbriellini, PhD

PostDoc@DISI, University of Bologna
mobile: +39 340 39 75 626
email: [email protected]
home: www.digitaldust.it

DigitalBrains srl
Amministratore
mobile: +39 340 39 75 626
email: [email protected]
home: www.digitalbrains.it

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to