Learn R Programming

oce (version 1.4-0)

read.adp: Read an ADP File

Description

Read an ADP data file, producing an '>adp object.

Usage

read.adp(
  file,
  from,
  to,
  by,
  tz = getOption("oceTz"),
  longitude = NA,
  latitude = NA,
  manufacturer,
  monitor = FALSE,
  despike = FALSE,
  processingLog,
  debug = getOption("oceDebug"),
  ...
)

Arguments

file

a connection or a character string giving the name of the file to load. (For read.adp.sontek.serial, this is generally a list of files, which will be concatenated.)

from

indication of the first profile to read. This can be an integer, the sequence number of the first profile to read, or a POSIXt time before which profiles should be skipped, or a character string that converts to a POSIXt time (assuming UTC timezone). See “Examples”, and make careful note of the use of the tz argument. If from is not supplied, it defaults to 1.

to

an optional indication of the last profile to read, in a format as described for from. As a special case, to=0 means to read the file to the end. If to is not supplied, then it defaults to 0.

by

an optional indication of the stride length to use while walking through the file. If this is an integer, then by-1 profiles are skipped between each pair of profiles that is read, e.g. the default by=1 means to read all the data. (For RDI files only, there are some extra features to avoid running out of memory; see “Memory considerations”.)

tz

character string indicating time zone to be assumed in the data.

longitude

optional signed number indicating the longitude in degrees East.

latitude

optional signed number indicating the latitude in degrees North.

manufacturer

an optional character string indicating the manufacturer, used by the general function read.adp to select a subsidiary function to use. If this is not given, then oceMagic() is used to try to infer the type. If this is provided, then the value "rdi" will cause read.adp.rdi() to be used, "nortek" will cause read.adp.nortek() to be used, and "sontek" will cause read.adp.sontek() to be used.

monitor

boolean value indicating whether to indicate the progress of reading the file, by using txtProgressBar() or otherwise. The value of monitor is changed to FALSE automatically, for non-interactive sessions.

despike

if TRUE, despike() will be used to clean anomalous spikes in heading, etc.

processingLog

if provided, the action item to be stored in the log. (Typically only provided for internal calls; the default that it provides is better for normal calls by a user.)

debug

a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more.

optional additional arguments that some (but not all) read.adp.*() functions pass to lower-level functions.

Value

An '>adp object. The contents of that object make sense for the particular instrument type under study, e.g. if the data file contains NMEA strings, then navigational data will be stored in an item called nmea in the data slot).

Details

Several file types can be handled. Some of these functions are wrappers that map to device names, e.g. read.aquadoppProfiler does its work by calling read.adp.nortek; in this context, it is worth noting that the ``aquadopp'' instrument is a one-cell profiler that might just as well have been documented under the heading read.adv().

See Also

Other things related to adp data: [[,adp-method, [[<-,adp-method, ad2cpHeaderValue(), adp-class, adpEnsembleAverage(), adp_rdi.000, adp, as.adp(), beamName(), beamToXyzAdpAD2CP(), beamToXyzAdp(), beamToXyzAdv(), beamToXyz(), beamUnspreadAdp(), binmapAdp(), enuToOtherAdp(), enuToOther(), handleFlags,adp-method, is.ad2cp(), plot,adp-method, read.adp.ad2cp(), read.adp.nortek(), read.adp.rdi(), read.adp.sontek.serial(), read.adp.sontek(), read.aquadoppHR(), read.aquadoppProfiler(), read.aquadopp(), rotateAboutZ(), setFlags,adp-method, subset,adp-method, subtractBottomVelocity(), summary,adp-method, toEnuAdp(), toEnu(), velocityStatistics(), xyzToEnuAdpAD2CP(), xyzToEnuAdp(), xyzToEnu()