Learn R Programming

oce (version 0.1-76)

subset.oce: Subset an oce object

Description

Subset an oce object

Usage

## S3 method for class 'oce':
subset(x, subset, indices=NULL, \dots)

Arguments

x
an oce object.
subset
a condition to be applied to the data portion of x (ignored for station objects).
indices
list of station indices (used only for section objects).
...
ignored.

Value

  • A new oce object.

Details

This is analogous to subset.data.frame. Note that it only works for objects in which the data portion is a data frame, e.g. ctd objects.

See Also

subset.data.frame, upon which this is based.

Examples

Run this code
library(oce)
data(ctd)
plot(ctd)
plot(subset(ctd, pressure>10))

Run the code above in your browser using DataLab