Learn R Programming

diveMove (version 0.7-5)

diveStats: Per-dive statistics

Description

Calculate dive statistics in TDR records.

Usage

diveStats(x)
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 for oneDiveStats.
interval
Sampling interval for interpreting x.
speed
Logical; should speed statistics be calculated?
ignoreZ
Logical indicating whether trips 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.
  • descdistNumeric vector with 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 ascent 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.
  • 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.
  • divetimDive duration.
  • maxdepNumeric vector with maximum depth.
  • postdive.durPostdive duration.
  • postdive.tdistNumeric vector with postdive total distance, estimated from speed.
  • postdive.mean.speedNumeric vector with postdive mean speed.
  • The number of columns depends on the value of speed.

    stampDive returns a data.frame with trip number, trip type, 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 trip information.

See Also

.detPhase, zoc, TDRcalibrate-class

Examples

Run this code
data(divesTDRcalibrate)
divesTDRcalibrate

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

Run the code above in your browser using DataLab