diveMove-package {diveMove} | R Documentation |
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.
Sebastian P. Luque spluque@gmail.com
A vignette with a guide to this package is available by doing
'vignette("diveMove")'.
TDR-class
,
calibrateDepth
,
calibrateVel
,
attendance
,
stampDive
.
## 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(getDAct(dcalib, "dive.id"))), phaseCol=getDPhaseLab(dcalib, 160:max(getDAct(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)