Hi R-sig-geo list,

A very easy question: I have a shapefile with 730 areas. Somo of these areas 
have two or three unconnected polygons, so that 

length(myshapefile$att.data$cod) is 758 eventhough there are only 730 cods.

Now I want to obtain the neighbourhood structure using

x.2<-Map2poly(myshapefile, region.id="cod")
x.nb<-poly2nb(x.2)
sapply(x.nb,length) 

But it seems that it does not recognize the polygons that belong to the same 
area (indicated by cod), and again length(sapply(x.nb,length)) is 758 in stead 
of 730 . What am I doing wrong? Thanks a lot in advance,

Berta.
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to