detDive-internal: Detect dives from depth readings

Description Usage Arguments Value Author(s) See Also Examples

Description

Identify dives in TDR records based on a dive threshold.

Usage

1
.detDive(zdepth, act, dive.thr)

Arguments

zdepth

numeric vector of zero-offset corrected depths.

act

factor as long as depth coding activity, with levels specified as in .detPhase.

dive.thr

numeric scalar: threshold depth below which an underwater phase should be considered a 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.

Author(s)

Sebastian P. Luque [email protected]

See Also

.detPhase, .zoc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Too long for checks
## Continuing the Example from '?calibrateDepth':
utils::example("calibrateDepth", package="diveMove",
               ask=FALSE, echo=FALSE)
dcalib		# the 'TDRcalibrate' that was created

tdr <- getTDR(dcalib)

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

diveMove documentation built on May 29, 2017, 4:19 p.m.