[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] as.numeric ( edge sequence )
From: |
Yulia Matveyeva |
Subject: |
[igraph] as.numeric ( edge sequence ) |
Date: |
Fri, 14 Oct 2011 12:15:14 +0400 |
Dear igraph-community,
If es is an edge sequence,
can I be sure that as.numeric(es) will always give me the ids of edges under
consideration.
So if I have
> es
Edge sequence:
[0] 1 -- 0
[2] 3 -- 0
[3] 4 -- 3
[4] 5 -- 4
[5] 7 -- 4
[6] 6 -- 4
> as.numeric(es)
[1] 0 2 3 4 5 6
Can I be sure that this behaviour will always be the same ?
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 ?
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] as.numeric ( edge sequence ),
Yulia Matveyeva <=