Skip to content
Prev 3333 / 29559 Next

How to check a large neighbourhood matrix?

On Thu, 27 Mar 2008, Danlin Yu wrote:

            
I think that Oscar had got this far using the prefered sp object:

SPDF <- readShapePoly()

nb <- poly2nb(SPDF)

but had needed to use the snap= argument to poly2nb() to overcome slivers 
in his polygons.
This helps, because it says which have no neighbours. It will indicate how 
to "zoom" in on the plot for the locations of the polygons. To actually 
"zoom", use xlim= and ylim= in the plot method for nb objects.

If you want real control, consider writeOGR(SPDF, ..., driver="KML") in 
the rgdal package, and equivalently writeOGR() of the 
SpatialLinesDataFrame output by nb2lines(), and zoom to your satisfaction 
in GE using KML files.

Roger