This function is somewhat analogous to subset.data.frame().

# S4 method for cm
subset(x, subset, ...)

Arguments

x

a cm object.

subset

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

...

ignored.

Value

A new cm object.

See also

Examples

library(oce) data(cm) plot(cm)
plot(subset(cm, time < mean(range(cm[['time']]))))