Skip to contents

Subset an adp (acoustic Doppler profile) object, in a manner that is function is somewhat analogous to subset.data.frame().

Usage

# S4 method for class 'adp'
subset(x, subset, ...)

Arguments

x

an adp object.

subset

A condition to be applied to the data portion of x. See “Details”.

...

Ignored.

Value

An adp object.

Details

For any data type, subsetting can be by time, ensembleNumber, or distance. These may not be combined, but it is easy to use a string of calls to carry out combined operations, e.g. subset(subset(adp,distance<d0), time<t0)

Author

Dan Kelley

Examples

library(oce)
data(adp)
# 1. Look at first part of time series, organized by time
earlyTime <- subset(adp, time < mean(range(adp[["time"]])))
plot(earlyTime)


# 2. Look at first ten ensembles (AKA profiles)
en <- adp[["ensembleNumber"]]
firstTen <- subset(adp, ensembleNumber < en[11])
plot(firstTen)