SpatialPolygonsDataFrame
.require(maptools) world.map.simplified <- readShapeSpatial("~/TM_WORLD_BORDERS_SIMPL-0.3/TM_WORLD_BORDERS_SIMPL-0.3.shp") slot(world.map.simplified, 'data')[,'NAME'] <- iconv(slot(world.map.simplified, 'data')[,'NAME'], "latin1", "UTF-8") save(world.map.simplified, file="data/world.map.simplified.rda")
The result is a SpatialPolygonsDataFrame
object. Its data slot contains a data frame with 246 observations and 11 variable: