igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] as.numeric ( edge sequence )


From: Gábor Csárdi
Subject: Re: [igraph] as.numeric ( edge sequence )
Date: Fri, 14 Oct 2011 15:48:55 -0400

On Fri, Oct 14, 2011 at 4:15 AM, Yulia Matveyeva
<address@hidden> wrote:
[...]
> The thing is that I would like to sort an edge sequence by the weights of the 
> edges.
> edges <- get.edges(mst1, E(mst1)[as.numeric(es)[order(es$weight, decreasing = 
> T)]])
> Is this a good (reliable) method to do this ?

Yes, that is fine. Or

get.edges(mst1, as.vector(es)[order(es$weight, decreasing=TRUE)])

is a bit simpler.

G.

> Thank you very much in adbance. I would greatly appreciate your answers.
>
> --
> Sincerely yours,
> Yulia Matveyeva,
> Department of Statistical Modelling,
> Faculty of Mathematics and Mechanics,
> St Petersburg State University, Russia
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

[Prev in Thread] Current Thread [Next in Thread]