make.sociomatrix.from.lattice {ElectroGraph} | R Documentation |
Given a set of points in two dimensions, produce a sociomatrix where a link exists if their distance is exactly 1.
make.sociomatrix.from.lattice(pts.nby2)
pts.nby2 |
An n-by-2 matrix whose rows are (x,y) coordinates of points. |
A sociomatrix whose entries correspond to indicators of whether the points are exactly 1 unit apart.
Andrew C. Thomas <act@acthomas.ca>
# generate a 5-by-5 grid of points. pts <- cbind(rep(1:5,5),sort(rep(1:5,5))) socio <- make.sociomatrix.from.lattice(pts)$sociomatrix