On Mon, Jul 29, 2013 at 4:40 PM, Gábor Csárdi <
address@hidden> wrote:
> On Mon, Jul 29, 2013 at 4:33 PM, Sam Steingold <
address@hidden> wrote:
>>
>> >>>
http://lists.gnu.org/archive/html/igraph-help/2009-03/msg00120.html
>> >> Is there an easy way to reverse direction of connections in a directed
>> >> graph?
>> >el <- get.edgelist(g, names=FALSE)
>> >g2 <- graph(rbind(el[,2],el[,1]))
>> >does the job, except that it loses all attributes.
>>
>> 4 years later, is there a better way (I want to keep the attributes,
>> obviously).
>
>
> get.data.frame() and then graph.data.frame() keeps the attributes.
>
> G.
>
>>
>>
>> Thanks!
>>
>> --
>> Sam Steingold (
http://sds.podval.org/) on Ubuntu 13.04 (raring) X
>> 11.0.11303000
>>
http://www.childpsy.net/ http://pmw.org.il http://americancensorship.org
>>
http://www.memritv.org http://honestreporting.com http://memri.org
>> A professor is someone who talks in someone else's sleep.
>>
>> _______________________________________________
>> igraph-help mailing list
>>
address@hidden
>>
https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>