Learn R Programming

oce (version 0.4-1)

pressure: Extract pressure, salinity, or temperature from an oce object

Description

Extract pressure, salinity, or temperature from an oce object

Usage

pressure(x, time)
  salinity(x, time)
  sigmaTheta(x, time)
  temperature(x, time)
  latitude(x, time)
  longitude(x, time)
  time(x, time)
  elevation(x, time)

Arguments

x
an oce object.
time
optional indication of times to which to interpolate. This may be a vector of POSIXt times, or an oce object that contains a vector of POSIXt times.

Value

  • A vector containing the indicated variable. For a ctd object, the returned value corresponds directly to the vector x$data$pressure (etc.), but for a section object, the returned value is built by stringing together the values of the indicate variable, station by station.

concept

data extraction

Details

This is a convenience function that isolates the user from the details of storage.

See Also

Similar accessor functions are heading, pitch, roll, velocity and time.

Examples

Run this code
library(oce)
  data(ctd)
  cat("Average ctd temperature:", mean(temperature(ctd), na.rm=TRUE), "")
  data(a03)
  plot.TS(as.ctd(salinity(a03),temperature(a03),pressure(a03)))

Run the code above in your browser using DataLab