On Thu, Sep 2, 2010 at 11:07 AM, Martin Tomko<address@hidden> wrote:
Thank you guys, that solved my problem.
I suspected that $weight should work, but simple listing of an edge did not
reveal the attribute. Need to find out how to get the full information about
the object...
You mean printing everything on the screen? Attributes are not printed
by default, but you can print them by giving extra arguments to the
print.igraph() function. You can also make printing them the default:
igraph.par("print.edge.attributes", TRUE)
igraph.par("print.graph.attributes", TRUE)
igraph.par("print.vertex.attributes", TRUE)
Best,
Gabor
Cheers
Martin
On 9/2/2010 10:52 AM, Tamas Nepusz wrote:
Sorry, got it working with weights, the appraoch mentionned worked, but
what confused me is that there is no access to a g$weights vector. I am
still not sure how to get the information for any individual edge.
E(g)[edgeindex]$weight seems to work for me in igraph 0.5.3. The only
thing to watch out for is that edges are indexed from zero, not 1, so
E(g)[1]$weight gives the weight of the second edge.