Learn R Programming

oce (version 0.1-75)

read.tdr: Read an RBR temperature-depth recorder data file

Description

Read an RBR temperature-depth recorder file, producing an object of type tdr.

Usage

read.tdr(file, debug=FALSE, log.action)

Arguments

file
a connection or a character string giving the name of the file to load.
debug
a flag that can be set to TRUE to turn on debugging.
log.action
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.)

Value

  • An object of class "tdr", which is a list with elements detailed below. The most important elements are the station name and position, along with the profile data that are contained in the data frame named data. (Other elements in the list may be deleted in future versions of the package, if they prove to be of little use in practice, or if they prove to have been idiosyncratic features of the particular files used in early development of oce.)
  • dataa data table containing the (t, temperature, pressure) data.
  • metadataa list containing the following items [object Object],[object Object],[object Object],[object Object]
  • processing.loga processing log, in the standard oce format.

Details

Read an RBR TDR (temperature-depth recorder) file.

See Also

The generic function read.oce provides an alternative to this. Objects of type tdr can be plotted with plot.tdr, and summarized with summary.tdr, both of which are generic functions. In-air samples (collected before and after deployment) may be removed in a crude way with tdr.trim, but the best scheme is to use subset.oce, based on a temporal window (see Examples). Removal of the atmospheric component of pressure is left up to the user; in many cases, it makes sense to treat this as a constant (see Examples).

Examples

Run this code
library(oce)
data(tdr)
# trim automatically
tdr.trim.auto <- tdr.trim(tdr)
# trim manually
plot(tdr, which=2)
# try a few times near start of record (15:00:00 seems good)
abline(v=as.POSIXct("2008-06-25 00:00:00"),col="red")
abline(v=as.POSIXct("2008-06-26 00:00:00"),col="red")
abline(v=as.POSIXct("2008-06-25 15:00:00"),col="red")
# try a few times near end of record (15:00:00 seems ok)
abline(v=as.POSIXct("2008-07-04 00:00:00"),col="blue")
abline(v=as.POSIXct("2008-07-05 10:00:00"),col="blue")
abline(v=as.POSIXct("2008-07-04 12:00:00"),col="blue")
tdr.trim.manual <- subset(tdr, as.POSIXct("2008-06-25 15:00:00") <= t &
t <= as.POSIXct("2008-07-04 12:00:00"))
plot(tdr.trim.manual)

Run the code above in your browser using DataLab