labDive-internal: Internal Functions used for Detection of Dives

Description Usage Arguments Details Value Author(s)

Description

These functions provide information for particular dives,

Usage

1
2
3
.cutDive(x, smooth.par, knot.factor, descent.crit.q, ascent.crit.q)
.labDive(act, string)
.labDivePhase(x, diveID, ...)

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 POSIXct times.

smooth.par, knot.factor, descent.crit.q, ascent.crit.q

Passed from calibrateDepth.

act

factor with values to label.

string

character string belonging to a level of act to search for and label sequentially.

diveID

numeric vector indexing each dive (non-dives should be 0)

...

Arguments passed to .cutDive (smooth.par and knot.factor).

Details

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

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 list with a factor having 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. The list also contains another list with diveModel objects for each dive.

.cutDive generates a diveModel object with details of model used to detect dive phases using cubic spline smoothing and its first derivative.

Author(s)

Sebastian P. Luque [email protected]


diveMove documentation built on May 2, 2019, 4:47 p.m.