Learn R Programming

IsoriX (version 0.6)

CountryBorders: Borders of world CountryBorders

Description

This dataset contains a polygon shapefile that can be used to plot the borders of CountryBorders.

Arguments

Format

A SpatialPolygons

See Also

OceanMask for another polygon shapefile used to embellish the plots

Examples

Run this code
# 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