[R-sig-Geo] polygon neighbor matrix
Roger.Bivand at nhh.no
Mon Aug 31 20:19:31 CEST 2015
On Mon, 31 Aug 2015, Paul Lantos wrote:
> I'm trying to use the cluster analysis program Flexscan, which I gather
> is similar to Satscan but it computes irregular clusters. This program
> requires a polygon adjacency matrix (termed a 'matrix definition file').
> The example they provide has a row for every polygon, and for each row
> every neighboring polygon is listed in successive columns. So for
> instance if row 1 / polygon 1 has 3 neighbors there will be three
> polygons listed in columns 2-4.
> I have tried some techniques like the spatial weights matrix tools in
> ArcGIS and in Spatstat, but I cannot get the output in this kind of
> format. Was wondering if there is some obvious way to do this in R.
> The documentation for Flexscan is here:
out <- sapply(seq(along=ncCR85_nb), function(i) paste(attr(ncCR85_nb,
"region.id")[i], paste(attr(ncCR85_nb, "region.id")[ncCR85_nb[[i]]],
> Thanks for any help,
> Paul M. Lantos, MD, FIDSA, FAAP, FACP
> Departments of Internal Medicine and Pediatrics
> Pediatric Infectious Diseases
> Hospital Medicine Program
> Duke University School of Medicine
> [[alternative HTML version deleted]]
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo