Learn R Programming

oce (version 0.8-10)

accessors: Access or modify part of an Oce object

Description

Access or modify part of an Oce object

Usage

elevation(x, time)
distance(x, time)
heading(x, time)
heading(x) <- value
latitude(x, time, byDepth=TRUE)
latitude(x) <- value
longitude(x, time, byDepth=TRUE)
longitude(x) <- value
pitch(x, time)
pitch(x) <- value
pressure(x, time)
pressure(x) <- value
roll(x, time)
roll(x) <- value
salinity(x, time)
salinity(x) <- value
sigmaTheta(x, time)
sigmaTheta(x) <- value
temperature(x, time)
temperature(x) <- value
oxygen(x, time)
oxygen(x) <- value
nitrate(x, time)
nitrate(x) <- value
nitrite(x, time)
nitrite(x) <- value
phosphate(x, time)
phosphate(x) <- value
silicate(x, time)
silicate(x) <- value
spice(x, time)
tritium(x, time)
time(x)
velocity(x)

Arguments

x
an oce object.
time
optional vector of POSIX times, or object the data slot of which contains times in a field named time or timeSlow. (If this argument is not provided, missing, values at all the times in x
byDepth
flag usd only for "section" objects, which indicates whether to repeat the latitude or longitude values so that there is a value for each depth in each profile.
value
value to assign to the relevant item in the x object.

Value

  • Value of indicated portion of x.

Details

These accessor functions provide a convenient way to discover, or set, data within oce objects. This prevents the user from having to know the details of storage, e.g. that Nortek Vector velocimeters record angles on slow timescales compared with velocities (stored within the data slot in entries named timeSlow, headingSlow, etc), whereas Sontek ADV velocimeters record them on the same timescale as velocity (stored in time, heading, etc.)

See Also

Similar accessor functions are time, and velocity.

Examples

Run this code
library(oce)
data(adp)
print(heading(adp))
heading(adp) <- 5 + heading(adp) # add 5 degrees to the heading
print(heading(adp))

Run the code above in your browser using DataLab