subset.coastline {oce}R Documentation

Subset a coastline object

Description

Subset a coastline object

Usage

## S4 method for signature 'coastline'
subset(x, subset, ...)

Arguments

x

a coastline object.

subset

a condition to be applied to the data portion of x. See ‘Details’.

...

ignored.

Details

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.

Value

A new coastline object.

Author(s)

Dan Kelley

Examples

library(oce)
data(coastlineWorld)
plot(coastlineWorld)
a <- subset(coastlineWorld, longitude < 0)
points(a[['longitude']], a[['latitude']], col='red', pch=20, cex=1/2)

[Package oce version 0.9-18 Index]