make.sociomatrix.from.lattice {ElectroGraph}R Documentation

make.sociomatrix.from.lattice

Description

Given a set of points in two dimensions, produce a sociomatrix where a link exists if their distance is exactly 1.

Usage

make.sociomatrix.from.lattice(pts.nby2)

Arguments

pts.nby2 An n-by-2 matrix whose rows are (x,y) coordinates of points.

Value

A sociomatrix whose entries correspond to indicators of whether the points are exactly 1 unit apart.

Author(s)

Andrew C. Thomas <act@acthomas.ca>

Examples

# 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


[Package ElectroGraph version 0.2.0 Index]