gSimplify (rgeos package) to simplify the geometries of a shapefile. The funcion works good, but now I can't write the output in a new shapefile.
I tried some ways:
writeOGR(simplyshape, file, driver="ESRI Shapefile", layer='test')
obj must be a SpatialPointsDataFrame, SpatialLinesDataFrame or SpatialPolygonsDataFrame
Error: is(x, "SpatialPolygonsDataFrame") is not TRUE