Learn R Programming

IsoriX (version 0.4-1)

oceanmask: Mask of world oceans

Description

This dataset contains a polygon shapefile that can be used to mask large bodies of water.

Usage

data(oceanmask)

Arguments

Format

A SpatialPolygons object

Source

This SpatialPolygons is derived from the worldcountries. See example for details on how we created the dataset.

See Also

worldcountries for another polygon shapefile used to embellish the plots

Examples

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