names of edges in graph classes
1
0
Entering edit mode
Paul Shannon ★ 1.1k
@paul-shannon-578
Last seen 10.2 years ago
I notice that edges appear to be named in two different ways: > edgeNames (g) [1:2] [1] "1~2" "1~3" > names (edgeData (g)) [1:2] [1] "1|2" "1|3" Does this different choice for separator character -- tilde in one case, vertical bar in the other -- convey some meaning it would behoove me to understand? Or is it perhaps an accidental difference? A drawback to the current approach is that edgeNames (e.g., "1~2") cannot be used to index into edgeData: > edgeData (g) [["1|2"]] # this works $edgeType [1] "cluster" $category [1] 1 > edgeData (g) [["1~2"]] # this doesn't NULL Thanks, - Paul
• 950 views
ADD COMMENT
0
Entering edit mode
@nishant-gopalakrishnan-3253
Last seen 10.2 years ago
Hi Paul, I am not sure why the edges are named in two different ways. The "| " character is reserved as an edge separator and node names cannot contain "|". It looks like you are right that they should have had a consistent naming schema. Nishant On 01/04/2011 06:13 PM, Paul Shannon wrote: > I notice that edges appear to be named in two different ways: > > >> edgeNames (g) [1:2] >> > [1] "1~2" "1~3" > > >> names (edgeData (g)) [1:2] >> > [1] "1|2" "1|3" > > Does this different choice for separator character -- tilde in one case, vertical bar in the other -- convey some meaning it would behoove me to understand? Or is it perhaps an accidental difference? > > A drawback to the current approach is that edgeNames (e.g., "1~2") cannot be used to index into edgeData: > > >> edgeData (g) [["1|2"]] # this works >> > $edgeType > [1] "cluster" > $category > [1] 1 > > >> edgeData (g) [["1~2"]] # this doesn't >> > NULL > > Thanks, > > - Paul > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT

Login before adding your answer.

Traffic: 875 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6