I have a SpatialPolygonsDataFrame
in R that I want to export to shapefile. I used writeOGR
to export but the cells with that contain text values with accents (é, è, à, ê, etc) are blank. When I export only the data slot as a csv
file, the values are preserved.
I have used the following when exporting:
writeOGR(obj=for.ana, dsn=".", layer="for_export",driver="ESRI Shapefile", encoding="UTF-8")
When I want to import a similar shapefile with French accents, I use the following code that works:
readOGR(".","file", use_iconv=TRUE, encoding="UTF-8")
What is the equivalent code for exporting?