Learn R Programming

diveMove (version 1.1)

labDive-internal: Internal Functions used for Detection of Dives

Description

These functions provide information for particular dives,

Usage

.cutDive(x, descent.crit.q, ascent.crit.q, wiggle.tol)
.labDive(act, string)
.labDivePhase(x, diveID, descent.crit.q, ascent.crit.q, wiggle.tol)

Arguments

x
For .labDivePhase, a class TDR object. For .cutDive, a 3-col matrix with subscript in original TDR object, non NA depths, and numeric vector representing
descent.crit.q, ascent.crit.q, wiggle.tol
Passed from calibrateDepth.
act
Factor with values to label.
string
A character belonging to a level of act to search for and label sequentially.
diveID
Numeric vector indexing each dive (non-dives should be 0)

Value

  • .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.

    .cutDive generates a character vector that breaks a dive into descent, descent/bottom, bottom, bottom/ascent, ascent, and/or descent/ascent given a proportion of maximum depth for bottom time. It return a character matrix with orig ID and corresponding label.

Details

These functions are for internal use and are not meant to be called by the user.