[R-sig-Geo] save polygon as a shape file

stefan lhachimi stefan.duke at gmail.com
Sat Jan 12 21:11:33 CET 2008


Hello,

I loaded a .shp-file and used a subset command while converting it
into a polygon to eliminate certain regions:

map.kreise<-readShapePoly("vg250krs",IDvar="KRS_ID",verbos=TRUE)
map.kreise.boden <-polygons(map.kreise)[x$BODENSEE==0]

Now I want to save the new object map.kreise.boden as a shp-file again
(I want to usethe new shp-file without certain regions into GEODA).
The writePolyShape-command does not work. It gives me the following
error message:

 writePolyShape(map.kreise.boden, "mapohnebodensee")
Fehler in as(x, "data.frame") :
  no method or default for coercing "SpatialPolygons" to "data.frame"

Any help is appreciated.
Best,
Stefan




More information about the R-sig-Geo mailing list