Learn R Programming

diveMove (version 1.1)

detDive-internal: Detect dives from depth readings

Description

Identify dives in TDR records based on a dive threshold.

Usage

.detDive(zdepth, act, dive.thr)

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.

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.

See Also

.detPhase, .zoc

Examples

Run this code
data(divesTDRcalibrate)

tdr <- getTDR(divesTDRcalibrate)

## Extract the gross activity from an already calibrated TDR object
gross.act <- getGAct(divesTDRcalibrate)
detd <- diveMove:::.detDive(getDepth(tdr), gross.act[[2]], 3)

Run the code above in your browser using DataLab