diveMove-package {diveMove}R Documentation

Time depth recorder analysis

Description

This package is a collection of functions for visualizing, and analyzing depth and velocity data from time-depth recorders TDRs. These can be used to zero-offset correct depth, calibrate velocity, and divide the record into different phases, or time budget. Functions are provided for calculating summary dive statistics for the whole record, or at smaller scales within dives.

Details

A vignette with a guide to this package is available at file://../inst/doc/diveMove.pdf

Author(s)

Sebastian P. Luque spluque@gmail.com

See Also

TDR-class, calibrateDepth, calibrateVel, attendance, stampDive

Examples

## read in data and create a TDR object
(sealX <- readTDR(system.file(file.path("data", "sealMK8.csv"),
                              package="diveMove")))
## Not run: plot(sealX)

## detect periods of activity, and calibrate depth, creating
## a 'TDRcalibrate' object
## Not run: (dcalib <- calibrateDepth(sealX))
(dcalib <- calibrateDepth(sealX, offset=3)) # zero-offset correct at 3 m

## plot dive number 100
## Not run: 
plot(extractDive(dcalib, 100))
## plot dives 160 to the last one and show dive phases
plot(extractDive(dcalib, 160:max(diveAct(dcalib, "dive.id"))),
     phaseCol=dPhaseLab(dcalib, 160:max(diveAct(dcalib, "dive.id"))))
## End(Not run)

## calibrate velocity
(vcalib <- calibrateVel(dcalib))

## Obtain dive statistics for all dives detected
dives <- diveStats(vcalib)
## See 'chron' for converting the time columns (1-3) to the desired
## output format
head(dives)

## Attendance table
att <- attendance(vcalib, TRUE)  # ignoring trivial aquatic activities
att <- attendance(vcalib, FALSE)  # taking them into account
## Add trip stamps to each dive
stamps <- stampDive(vcalib)
sumtab <- data.frame(stamps, dives)
head(sumtab)

[Package diveMove version 0.1-6 Index]