## S3 method for class 'oce}(x, subset, indices=NULL, debug=getOption("oceDebug"), \dots)':
subsetundefined- 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).}
- debug
{a flag that turns on debugging. Set to 1 to get a
moderate amount of debugging information, or to 2 to get more.}
- ...
{ignored.}
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.
For objects of class adp, the subset may be in terms
of time or distance; to combine these, use two steps
(see Examples ).
A new oce object.
window.oce provides a simpler, but less powerful,
way to subset data.
library(oce)
# CTD data
data(ctd)
plot(ctd)
plot(subset.oce(ctd, pressure>10))
# ADP example, subsetted by time and distance
data(adp)
adpNear <- subset.oce(adp, distance < 10)
# Note that the data may be accessed directly, as below
adpNearEarly <- subset.oce(adpNear, time < mean(adpNear@data$time))
plot(adpNearEarly)
[object Object]
misc