data(oceanmask)
if(require(sp))
plot(oceanmask, col='blue')
## HOW DID WE CREATE THIS FILE?
## (This example takes some time and will therefore not be run
## unless you type: example(oceanmask, run.dontrun=TRUE) )
## Not run:
# if(require(raster) & require(rgeos)){
# worldlimit <- as(extent(worldcountries), "SpatialPolygons")
# proj4string(worldlimit) <- crs(worldcountries)
# oceanmask <- gDifference(worldlimit, worldcountries)
# oceanmask
# ## uncomment the following to store the file:
# #save(oceanmask, file="oceanmask.rda", compress="xz")
# }
# ## End(Not run)
Run the code above in your browser using DataLab