time.oce {oce} | R Documentation

## Extract time from an oce object

### Description

Extract time from an oce object

### Usage

    ## S3 method for class 'oce'
    time(x, ...)

### Arguments

`x` | an `oce` object.
`...` | possibly contains an argument named `which`, as explained in “Details”.

### Details

This is a convenience function that isolates the user from the details of details of storage. The behaviour depends on the type of object.

- `adv` objects: the times for the velocity observations are returned as a vector of POSIX times.

- `adp` objects: by default, the times of velocity observations are returned. This is also the case if `which=1` is supplied in the ... list. If `which=2` is supplied in the ... list, the times at which heading was measured are returned; for some instruments, these are not the same as the velocity times.

### Value

A vector of times.

### Author(s)

Dan Kelley

### See Also

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

### Examples

    library(oce)
    data(adp)
    cat("the first time is:", format(time(adp)[1]), "\n")

[Package oce version 0.9-18 Index]