[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] how to subgraph layout coordinates
From: |
Simone Gabbriellini |
Subject: |
Re: [igraph] how to subgraph layout coordinates |
Date: |
Sun, 1 Mar 2009 18:23:25 +0100 |
thanks Gabor,
can you please tell me also how to convert a list of label into a list
of the correspondent vertex ids? Cause I have to subgraph and the ids
switches so I need to find the same nodes using their labels...
best regards,
simone
2009/3/1 Gábor Csárdi <address@hidden>:
> It is easier than that:
>
> l2 <- l[ my.vertices+1, ]
>
> The +1 is needed because igraph is 0-based, R is 1-based.
>
> Gabor
>
> On Sun, Mar 1, 2009 at 4:55 PM, Simone Gabbriellini
> <address@hidden> wrote:
>> List,
>>
>> I am trying to subset coordinates from a layout, because I want to
>> plot over an existing plot, and I need the coordinates of nodes to be
>> fixed
>>
>> I tryied something like:
>>
>> # list of my subset nodes
>> core = c(1,2,3,4,5)
>>
>> l2 <- l[ which( V(g) == core ) ]
>>
>> but I got the error
>>
>> Warning message:
>> In V(g) + 1 == core :
>> longer object length is not a multiple of shorter object length
>>
>> can someone point me in the right direction?
>>
>> thanks,
>> simone
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>
>
> --
> Gabor Csardi <address@hidden> UNIL DGM
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>