# NOT RUN {
data(countries)
if(require(sp))
plot(countries, 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(countries, run.dontrun=TRUE) )
# }
# NOT RUN {
if(require(maps) & require(maptools) & require(raster) & require(rgeos)){
worldmap <- map("world", fill=TRUE, plot=FALSE)
countries <- map2SpatialPolygons(worldmap, IDs=worldmap$names)
countries <- gBuffer(countries, byid=TRUE, width=0)
proj4string(countries) <- CRS("+proj=longlat +datum=WGS84")
countries
## uncomment the following to store the file:
#save(countries, file="countries.rda", compress="xz")
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab