detDive {diveMove}R Documentation

Detect dives from depth readings

Description

Identify dives in TDR records based on a dive threshold.

Usage

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

Arguments

time chron object specifying times for each depth reading. This is most commonly the first element of the data frame returned by readTDR.
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 chron units (d).
x a class ‘TDR’ object
diveID numeric vector indexing each dive (non-dives should be 0)

Details

\emph{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.

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

\emph{labDivePhase} labels each row identifying it with a portion of the dive.

Value

A data frame with the following elements for detDive

dive.id numeric vector numbering each dive in the record.
dive.activity factor with levels ‘L’, ‘W’, ‘U’, ‘D’, and ‘Z’, see detPhase. All levels may be represented.
postdive.id numeric 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.

Author(s)

Sebastian P. Luque spluque@gmail.com

See Also

detPhase, zoc


[Package diveMove version 0.5-0 Index]