[Top][All Lists]

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

[igraph] to attach edge weights

From: MATSUDA, Noriyuki
Subject: [igraph] to attach edge weights
Date: Thu, 29 Nov 2007 11:42:36 +0900


   I'd be happy if any one can tell me how to attach edge weights on
the basis of a connectedness/similarity matrix.  Suppose I do the
following for a 3 by 3 correlation matrix
   m<- rbind(c(1, 0.2, 0.6), c(0.2, 1, 0.8), c(0.6, 0.8, 1))
   m[m(a)<0.5] <-0;  m[m(a)>=0.5] <-1  #There must be a better way
   g<-graph.adjacency(m, mode="upper"] #upper includes diagonals
   E(g)$weight ???????

Thanks in advance
MATSUDA, Noriyuki <in Kanji> 松 田 紀 之

reply via email to

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