# NOT RUN {
if(require(sp))
plot(CountryBorders, border="red", col="darkgrey")
## How did we create this file?
if(require(maps) & require(maptools) & require(raster) & require(rgeos)){
worldmap <- map("world", fill = TRUE, plot = FALSE)
CountryBorders <- map2SpatialPolygons(worldmap, IDs = worldmap$names)
CountryBorders <- gBuffer(CountryBorders, byid = TRUE, width = 0)
proj4string(CountryBorders) <- CRS("+proj=longlat +datum=WGS84")
CountryBorders
## Uncomment the following to store the file as we did
#save(CountryBorders, file = "CountryBorders.rda", compress = "xz")
}
# }
Run the code above in your browser using DataLab