[R] how to convert a table to adjacency matrix used in social network analysis?

From: Samuel <samuel.yh.wu_at_gmail.com>
Date: Wed, 27 Feb 2008 16:13:35 +0800

Hi Guys,

Do you any one know how to convert a long format table to an adjacency matrix used in sna? The long table looks like

p1 p2 counts
a b 100
a c 200
a d 100
b c 80
b d 90
b e 100
c d 100
c e 40
d e 60

and I want to convert it to an adjacency matrix which can be used in sna?

Any methods will be appreciated!

btw, besides sna package, is there any better package can be used in social network analysis, specially good at plotting?

Thanks in advance!


Samuel Wu

	[[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 27 Feb 2008 - 08:25:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Feb 2008 - 11:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive