[R] Social Network Analysis and R
Uwe Ligges
ligges at statistik.uni-dortmund.de
Wed Apr 23 08:54:55 CEST 2003
Emmanuel F. Koku wrote:
> I'm interested in computing densities of a number of small ego-centred or local
> networks. I've installed both the R program and the sna package. My next task
> is importing the data into R.
>
> Our data was entered into Spss in an edgelist format in which each case
> specifies the link between an alter and an ego. For example:
>
> 10101 10102 1
> 10101 10103 3
> 10102 10104 2
> 10201 10203 4
> 10203 10204 2
>
> The following data fragment for example shows an ego-centred network of 2
> persons: 101 and 102. Person 101 for example reports of a closeness of ties
> between alters 01 and 02 = value of 1; alters 01 and 03 - value of 3, etc.
> Similarly Person 102 reports on the closeness of ties between his alters 01
> and 03 = value of 4; and alters 03 and 04=value of 2.
>
> We have about 350 of these small ego networks represented as 560 cases in
> edgelist format in spss (each line or ego-alter relational link represents a
> case in spss).
>
> First, how do I write out the commands in R to read the edgelists ?
>
> Secondly, is there any way to tell R that the first 3 characters of the ego
> and alter values are actually identifiers for the ego networks -- so that
> densities are computed for each these?
>
> I've begun reading the reference manual on data reading and import facilities
> and hope that would help me get further along.
[The question arises why you did not finish it before asking.]
See ?read.fwf for importing the data.
Uwe Ligges
More information about the R-help
mailing list