[R-sig-Geo] N-order adjacency spatial weighted matrix from a polygonal shape file whithin R

Juta Kawalerowicz juta.kawalerowicz at stx.ox.ac.uk
Sat Jan 28 23:08:51 CET 2012


Fabricio,

Have you checked nblag() in spdep? Follow the example in documentation 
and you will see that when you plot the neighbourhood list on spatial 
polygons the n-th order will be under col.lags[[n]]

then if you want both cumulate it with nblag_cumul() and convert to 
spatial weights with nb2listw()

Juta


On 28/01/2012 21:10, Fabricio Vasselai wrote:
> Dears,
>
> Although I am formaly new to this mailing list, for months I've been
> reading lots of threads here both on handling shape files and on making
> different adjacency spatial weighted matrices. But I still keep wondering
> and trying if is it possible to: 1) make n-order adjacency matrix from a
> poly shape file directly whithin R (queen or rook types); 2) customize the
> weights that each {1...n} order would be assigned.
>
> Of course it is possible to handle a first order adjacecy matrix trough the
> poly2nb command of spdep, but I did not realize yet how to properly do
> n-order adjacency without using GeoDa or ArcGIS.
> Maybe I am missing something of spdep in here?
>
> Best,
>
> Fabricio
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list