Learn R Programming

oce (version 0.2-1)

read.cm: Read a current-meter data file

Description

Read a current-meter data file, producing an object of type cm.

Usage

read.cm(file, from=1, to, by=1, tz=getOption("oceTz"),
        type=c("s4"),
        latitude=NA, longitude=NA,
        debug=getOption("oceDebug"), monitor=TRUE, history, ...)

Arguments

file
a connection or a character string giving the name of the file to load.
from
index number of the first measurement to be read, or the time of that measurement, as created with as.POSIXct (hint: use tz="UTC").
to
indication of the last measurement to read, in a format matching that of from.
by
an indication of the stride length to use while walking through the file. If this is an integer, then by-1 measurements are skipped between each pair of profiles that is read. This may not make much sense, if the data are not equi
latitude
optional signed number indicating the latitude in degrees North.
longitude
optional signed number indicating the longitude in degrees East.
type
character string indicating type of file (ignored at present).
tz
character string indicating time zone to be assumed in the data.
debug
a flag that turns on debugging. The value indicates the depth within the call stack to which debugging applies.
monitor
ignored at present.
history
if provided, the action item to be stored in the log. This parameter is typically only provided for internal calls; the default that it provides is better for normal calls by a user.
...
optional arguments passed to plotting functions.

Value

  • An object of class "cm", which contains measurements made with a current-meter device. For information on data stored in the object, see Details.

Details

This function has been tested on only a single file, and the data-scanning algorithm was based on visual inspection of that file. Whether it will work generally is an open question.

See Also

Objects of class cm may be plotted with plot.cm or summarized with summary.cm.

Examples

Run this code
library(oce)
cm <- read.oce("cm_interocean_0811786.s4a.tab")
summary(cm)
plot(cm)

Run the code above in your browser using DataLab