Learn R Programming

diveMove (version 0.6-8)

detDive: Detect dives from depth readings

Description

Identify dives in TDR records based on a dive threshold.

Usage

detDive(zdepth, act, divethres=4, ...)
labDive(act, string, interval)
labDivePhase(x, diveID)

Arguments

zdepth
vector of zero-offset corrected depths.
act
factor as long as depth coding activity, with levels specified as in detPhase.
divethres
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)

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.

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 at-sea 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