extract {oce}R Documentation

Extract data from an oce object

Description

Extract data from an oce object

Usage

extract(x, names)

Arguments

x

an oce object.

names

a vector of character values, indicating names of items to be extracted.

Details

This is a convenience function that extracts data from an oce object, providing the user with isolation from the internal storage scheme used in oce objects.

Value

A list of the values found.

Author(s)

Dan Kelley

Examples

library(oce)
## ctd cast
data(ctd)
TS <- extract(ctd, c("temperature", "salinity"))
print(summary(lm(temperature~salinity, data=TS)))

## section
data(section)
TSlon <- extract(section, c("temperature","salinity","pressure","longitude"))
med <- factor(-20 > TSlon$longitude, labels=c("med","other"))
plotTS(TSlon, col=c("black","gray")[med])

[Package oce version 0.9-18 Index]