subset,argo-method {oce}R Documentation

Subset an argo object

Description

This function is somewhat analogous to subset.data.frame, but only one independent variable may be used in subset in any call to the function, which means that repeated calls will be necessary to subset based on more than one independent variable. Subsetting may be by by anything stored in the data, e.g. time, latitude, longitude, profile, dataMode, or pressure or by profile (a made-up variable) or id (from the metadata slot).

Usage

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

Arguments

x

An object inheriting from argo-class.

subset

An expression indicating how to subset x.

...

Ignored.

Value

An argo object.

See Also

argoGrid for gridding argo objects.

Examples

library(oce)
data(argo)
par(mfrow=c(2,2))
plot(argo)
plot(subset(argo, time > mean(time)))
plot(subset(argo, longitude > mean(longitude)))
plot(subset(argoGrid(argo), pressure > 500 & pressure < 1000), which=5)

# Plot only delayed-mode profiles.
par(mfrow=c(1,1))
plot(subset(argo, dataMode == "D"))

[Package oce version 0.9-18 Index]