diveStats {diveMove} | R Documentation |
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 |
depth.deriv |
logical: should depth derivative statistics be calculated? |
interval |
numeric scalar: sampling interval for interpreting
|
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. |
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.
Value
A data.frame
with one row per dive detected
(durations are in s, and linear variables in m):
begdesc |
A |
enddesc |
A |
begasc |
A |
desctim |
Descent duration of each dive. |
botttim |
Bottom duration of each dive. |
asctim |
Ascent duration of each dive. |
divetim |
Dive duration. |
descdist |
Numeric vector with last descent depth. |
bottdist |
Numeric vector with the sum of absolute depth differences while at the bottom of each dive; measure of amount of “wiggling” while at bottom. |
ascdist |
Numeric vector with first ascent depth. |
bottdep.mean |
Mean bottom depth. |
bottdep.median |
Median bottom depth. |
bottdep.sd |
Standard deviation of bottom depths. |
maxdep |
Numeric vector with maximum depth. |
desc.tdist |
Numeric vector with descent total distance, estimated from speed. |
desc.mean.speed |
Numeric vector with descent mean speed. |
desc.angle |
Numeric vector with descent angle, from the surface plane. |
bott.tdist |
Numeric vector with bottom total distance, estimated from speed. |
bott.mean.speed |
Numeric vector with bottom mean speed. |
asc.tdist |
Numeric vector with ascent total distance, estimated from speed. |
asc.mean.speed |
Numeric vector with ascent mean speed. |
asc.angle |
Numeric vector with ascent angle, from the bottom plane. |
postdive.dur |
Postdive duration. |
postdive.tdist |
Numeric vector with postdive total distance, estimated from speed. |
postdive.mean.speed |
Numeric 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.
Functions
-
oneDiveStats
: Calculate dive statistics for a single dive -
stampDive
: Stamp dives
Author(s)
Sebastian P. Luque spluque@gmail.com
See Also
calibrateDepth
, .detPhase
,
TDRcalibrate-class
Examples
## Too long for checks
## Continuing the Example from '?calibrateDepth':
utils::example("calibrateDepth", package="diveMove",
ask=FALSE, echo=FALSE, run.donttest=TRUE)
dcalib # the 'TDRcalibrate' that was created
tdrX <- diveStats(dcalib)
stamps <- stampDive(dcalib, ignoreZ=TRUE)
tdrX.tab <- data.frame(stamps, tdrX)
summary(tdrX.tab)