subset,oce-method {oce} | R Documentation

## Subset an oce Object

### Description

This is a basic class for general oce objects. It has specialised versions for most sub-classes, e.g. `subset.ctd` will be used if `subset` is called for an object that inherits from `ctd`; type `showMethods('subset')` to see a list of objects that have specialized methods, and then e.g. type `?subset.ctd` to get help on the method for objects inheriting from the `ctd-class`.

### Usage

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

### Arguments

`x` | An oce object.
`subset` | A logical expression indicating how to take the subset (depends on the sub-class).
`...` | Ignored.

### Value

An oce object.

### Examples

    library(oce)
    data(ctd)
    # Select just the top 10 metres (pressure less than 10 dbar)
    top10 <- subset(ctd, pressure < 10)
    par(mfrow=c(1, 2))
    plotProfile(ctd)
    plotProfile(top10)

[Package oce version 0.9-18 Index]