Learn R Programming

diveMove (version 0.7-2)

detDive: Detect dives from depth readings

Description

Identify dives in TDR records based on a dive threshold.

Usage

detDive(zdepth, act, dive.thr=4, ...)
labDive(act, string, interval)
labDivePhase(x, diveID, descent.crit.q, ascent.crit.q, wiggle.tol)

Arguments

zdepth
vector of zero-offset corrected depths.
act
factor as long as depth coding activity, with levels specified as in detPhase.
dive.thr
threshold depth below which an underwater phase should be considered a dive.
string
a character belonging to a level of act to search for and label sequentially.
interval, ...
the sampling interval in seconds.
x
a class TDR object
diveID
numeric vector indexing each dive (non-dives should be 0)
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.

Value

  • A data frame with the following elements for detDive
  • dive.idnumeric vector numbering each dive in the record.
  • dive.activityfactor with levels L, W, U, D, and Z, see detPhase. All levels may be represented.
  • postdive.idnumeric vector numbering each postdive interval with the same value as the preceding dive.
  • labDive returns a matrix with as many rows as its first two arguments with two columns: dive.id, and postdive.id, each one sequentially numbering each dive and postdive period.

    labDivePhase returns a factor with levels D, DB, B, BA, A, DA, and X, breaking the input into descent, descent/bottom, bottom, bottom/ascent, ascent, and non-dive, respectively. If x contains no dives, only level X is present for all readings.

Details

detDive detects a dive whenever the zero-offset corrected depth in an underwater phase is below the supplied dive threshold. The adjustment is done only for phases of wet activity, completely ignoring phases with other activity.

labDive assigns a unique number to each dive along a vector of depths, and equally numbering the subsequent postdive interval.

labDivePhase labels each row identifying it with a portion of the dive.

See Also

detPhase, zoc