Learn R Programming

diveMove (version 1.3.9)

diveStats: Per-dive statistics

Description

Calculate dive statistics in TDR records.

Usage

diveStats(x, depth.deriv=TRUE)
oneDiveStats(x, interval, speed=FALSE)
stampDive(x, ignoreZ=TRUE)

Arguments

x
A TDRcalibrate-class object for diveStats and stampDive, and a data.frame containing a single dive's data (a
depth.deriv
logical: should depth derivative statistics be calculated?
interval
numeric scalar: sampling interval for interpreting x.
speed
logical: should speed statistics be calculated?
ignoreZ
logical: whether phases should be numbered considering all aquatic activities (W and Z) or ignoring Z activities.

Value

  • A data.frame with one row per dive detected (durations are in s, and linear variables in m):
  • begdescA POSIXct object, specifying the start time of each dive.
  • enddescA POSIXct object, as begdesc indicating descent's end time.
  • begascA POSIXct object, as begdesc indicating the time ascent began.
  • desctimDescent duration of each dive.
  • botttimBottom duration of each dive.
  • asctimAscent duration of each dive.
  • divetimDive duration.
  • descdistNumeric vector with last descent depth.
  • bottdistNumeric vector with the sum of absolute depth differences while at the bottom of each dive; measure of amount of wiggling while at bottom.
  • ascdistNumeric vector with first ascent depth.
  • bottdep.meanMean bottom depth.
  • bottdep.medianMedian bottom depth.
  • bottdep.sdStandard deviation of bottom depths.
  • maxdepNumeric vector with maximum depth.
  • desc.tdistNumeric vector with descent total distance, estimated from speed.
  • desc.mean.speedNumeric vector with descent mean speed.
  • desc.angleNumeric vector with descent angle, from the surface plane.
  • bott.tdistNumeric vector with bottom total distance, estimated from speed.
  • bott.mean.speedNumeric vector with bottom mean speed.
  • asc.tdistNumeric vector with ascent total distance, estimated from speed.
  • asc.mean.speedNumeric vector with ascent mean speed.
  • asc.angleNumeric vector with ascent angle, from the bottom plane.
  • postdive.durPostdive duration.
  • postdive.tdistNumeric vector with postdive total distance, estimated from speed.
  • postdive.mean.speedNumeric vector with postdive mean speed.
  • If depth.deriv=TRUE, 21 additional columns with the minimum, first quartile, median, mean, third quartile, maximum, and standard deviation of the depth derivative for each phase of the dive. The number of columns also depends on argument speed.

    stampDive returns a data.frame with phase number, activity, and start and end times for each dive.

Details

diveStats calculates various dive statistics based on time and depth for an entire TDR record. oneDiveStats obtains these statistics from a single dive, and stampDive stamps each dive with associated phase information.

See Also

calibrateDepth, .detPhase, TDRcalibrate-class

Examples

Run this code
## Continuing the Example from '?calibrateDepth':
utils::example("calibrateDepth", package="diveMove",
               ask=FALSE, echo=FALSE)
dcalib		# the 'TDRcalibrate' that was created

tdrX <- diveStats(dcalib)
stamps <- stampDive(dcalib, ignoreZ=TRUE)
tdrX.tab <- data.frame(stamps, tdrX)
summary(tdrX.tab)

Run the code above in your browser using DataLab