Learn R Programming

diveMove (version 0.6-9)

calibrateDepth: Calibrate and build a "TDRcalibrate" object

Description

These functions create a "TDRcalibrate" object which is necessary to obtain dive summary statistics.

Usage

calibrateDepth(x, landerr=70, seaerr=3610, divethres=4, offset,
               descent.crit.q=0.1, ascent.crit.q=0.5, wiggle.tol=0.8)
calibrateSpeed(x, tau=0.1, contour.level=0.1, z=0, bad=c(0, 0),
               main=slot(getTDR(x), "file"), coefs, plot=TRUE,
               postscript=FALSE, ...)

Arguments

x
an object of class TDR for calibrateDepth or an object of class TDRcalibrate for calibrateSpeed.
landerr, seaerr
arguments to detPhase.
divethres
argument to detDive.
offset
argument to zoc.
descent.crit.q
critical quantile of rates of descent below which descent is deemed to have ended.
ascent.crit.q
critical quantile of rates of ascent above which ascent is deemed to have started.
wiggle.tol
Proportion of maximum depth above which wiggles should not be allowed to define the end of descent. It's also the proportion of maximum depth below which wiggles should be considered part of bottom phase.
tau
quantile on which to regress speed on rate of depth change; passed to rq.
contour.level
the mesh obtained from the bivariate kernel density estimation corresponding to this contour will be used for the quantile regression to define the calibration line.
z
only changes in depth larger than this value will be used for calibration.
bad
length 2 numeric vector to indicate that only rates of depth change and speed, respectively, will be used for calibration.
coefs
known speed calibration coefficients from quantile regression as a vector of length 2 (intercept, slope). If provided, these coefficients are used for calibrating speed, ignoring all other arguments, except x.
main, ...
arguments passed to rqPlot.
plot
logical indicating whether to plot the results.
postscript
logical indicating whether to produce postscript file output.

Value

Details

These functions are really wrappers around functions that are usually called in sequence, so they provided an abbreviated method for running them together during analyses. See the functions in the See Also section for more details.

calibrateDepth performs zero-offset correction of depth, wet/dry phase detection, and detection of dives, as well as proper labelling of the latter.

calibrateSpeed calibrates speed readings.

See Also

detPhase, detDive, zoc, for the underlying functions.