diveMove-package {diveMove} | R Documentation |
This package is a collection of functions for visualizing, and analyzing depth and speed data from time-depth recorders TDRs. These can be used to zero-offset correct depth, calibrate speed, 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
,
calibrateSpeed
,
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) # pan and zoom through the record ## End(Not run) ## detect periods of activity, and calibrate depth, creating ## a 'TDRcalibrate' object ## Not run: dcalib <- calibrateDepth(sealX) # interactively (dcalib <- calibrateDepth(sealX, offset=3)) # zero-offset correct at 3 m ## Not run: ## plot all readings and label them with the phase of the record ## they belong to, excluding surface readings plot(dcalib, labels="phase.id", surface=FALSE) ## plot the first 300 dives, showing dive phases and surface readings plot(dcalib, diveNo=seq(300), labels="dive.phase", surface=TRUE) ## End(Not run) ## calibrate speed (using default remaining arguments) (vcalib <- calibrateSpeed(dcalib)) ## Obtain dive statistics for all dives detected dives <- diveStats(vcalib) head(dives) ## Attendance table att <- attendance(vcalib, FALSE) # taking trivial aquatic activities into account att <- attendance(vcalib, TRUE) # ignoring them ## Add trip stamps to each dive stamps <- stampDive(vcalib) sumtab <- data.frame(stamps, dives) head(sumtab)