subset.coastline {oce} | R Documentation |
Subset a coastline object
## S4 method for signature 'coastline' subset(x, subset, ...)
x |
a |
subset |
a condition to be applied to the |
... |
ignored. |
This function is somewhat analogous to
subset.data.frame
. Points on the coastline that are outside
the subset region are set to NA
. If the results are to be plotted
with plot.coastline
, it will be necessary to set the argument
fill=NULL
to avoid filling land areas.
A new coastline
object.
Dan Kelley
library(oce) data(coastlineWorld) plot(coastlineWorld) a <- subset(coastlineWorld, longitude < 0) points(a[['longitude']], a[['latitude']], col='red', pch=20, cex=1/2)