[R] Problem with a matrix
Ambrosini Alessandro
klavan at tiscalinet.it
Sat Apr 20 20:58:54 CEST 2002
I have a scattered matrix that I have to import from an external file. In
this case all the lines could have a different size. The graph is oriented.
I give you an example:
a b c
b a c d
c b
The first row expresses that "a" has a direct path with "b" and also with
"c".
In the second "b" has a path with "a" and one with "c". In the third "c"
there is a direct path with "b".
I want to obtain the adjacency matrix. In this case it is:
0 1 1 0
1 0 1 1
0 1 0 0
0 0 0 0
What have I to do?
Please help me. Excuse me for my english.
Alessandro Ambrosini
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list