extract {oce} | R Documentation |
Extract data from an oce object
extract(x, names)
x |
an |
names |
a vector of character values, indicating names of items to be extracted. |
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.
A list of the values found.
Dan Kelley
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])