Skip to content
Prev 1222 / 29559 Next

Map2Poly: Error message

Dear Roger (...and the list)

Thank you Roger for that useful insight. I have tried your suggestion and,
once again, encountered some error messages. I've played around with it a
little bit, but I'm getting nowhere.

Perhaps you will have come across this problem before.

I tried your routine so I typed:

library(foreign)
library(maptools)
library(spdep)
map<-readShapePoly("englandandwales.shp")

But I got the following error:

Error in if (rD < 0) hole <- TRUE : missing value where TRUE/FALSE needed

Following the various examples in the help file I then tried

map<-readShapePoly("englandandwales.shp", IDvar="LABEL")

But now get the following error:

Error in from [j]: to [j]: NA/NaN argument

Error in coordinates(coords): unable to find the argument 'obj' in selecting
a method for function 'coordinates'


I've got this feeling I'm just doing something really silly but can't work
it out. Any help welcome. It may help to know that all I want to do is
produce a proximity matrix of contiguous boundary neighbours from the
Shapefile for now.


Again, I'm using R2.2.0 on an Apple iBook G4. The shapefile is a merged file
of England and Wales ward boundaries downloaded from Edina.ac.uk and was
merged in ArcView. It contains some 8,500 polygons and is 250MB.

Thank you,
Graham