igraph-help
[Top][All Lists]
Advanced

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

[igraph] adding weights on edges


From: Laís Mozzaquattro
Subject: [igraph] adding weights on edges
Date: Wed, 9 Oct 2013 15:22:12 -0300

I'm new in igraph and R and i'm having some trouble to add weights is edges on a graph that I created. The only way that I found to do it is by adding it one by one, like this:

forqueta.ligeiro[1,2,attr="weight"]<-sum(custos[1,],na.rm=T)
forqueta.ligeiro[2,3,attr="weight"]<-sum(custos[2,],na.rm=T)
forqueta.ligeiro[3,4,attr="weight"]<-sum(custos[3,],na.rm=T)

and so on...

My problem is that I have a big graph, with at least 90 edges, and I want to know if there's a more automatic way to do it, like inserting a vector with all my weight on the edges of a graph.

Thank you!

Laís Bohrer Mozzaquattro


reply via email to

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