data(worldcountries)
if(require(sp))
plot(worldcountries, border="red", col="darkgrey")
### HOW DID WE CREATE THIS FILE?
### (This example takes some time and will therefore not be run
### unless you type: example(worldcountries, run.dontrun=TRUE) )
## Not run:
# if(require(maps) & require(maptools) & require(raster) & require(rgeos)){
# worldmap <- map("world", fill=TRUE, plot=FALSE)
# worldcountries <- map2SpatialPolygons(worldmap, IDs=worldmap$names)
# worldcountries <- gBuffer(worldcountries, byid=TRUE, width=0)
# proj4string(worldcountries) <- CRS("+proj=longlat +datum=WGS84")
# worldcountries
# ## uncomment the following to store the file:
# #save(worldcountries, file="worldcountries.rda", compress="xz")
# }
# ## End(Not run)
Run the code above in your browser using DataLab