| diveModel-class | R Documentation |
Details of model used to identify the different phases of a dive.
label.matrixObject of class "matrix". A 2-column
character matrix with row numbers matching each observation to the
full TDR object, and a vector labelling the phases of
each dive.
modelObject of class "character". A string identifying
the specific model fit to dives for the purpose of dive phase
identification. It should be one of ‘smooth.spline’ or
‘unimodal’.
dive.splineObject of class "smooth.spline". Details of
cubic smoothing spline fit (see
smooth.spline).
spline.derivObject of class "list". A list with the
first derivative of the smoothing spline (see
predict.smooth.spline).
descent.critObject of class "numeric". The index of the
observation at which the descent was deemed to have ended (from
initial surface observation).
ascent.critObject of class "numeric". the index of the
observation at which the ascent was deemed to have ended (from
initial surface observation).
descent.crit.rateObject of class "numeric". The rate of
descent corresponding to the critical quantile used.
ascent.crit.rateObject of class "numeric". The rate of
ascent corresponding to the critical quantile used.
Objects can be created by calls of the form new("diveModel",
...).
‘diveModel’ objects contain all relevant details of the process to
identify phases of a dive. Objects of this class are typically generated
during depth calibration, using calibrateDepth, more
specifically .cutDive.
Sebastian P. Luque spluque@gmail.com
getDiveDeriv, plotDiveModel
showClass("diveModel")
## 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
## Compare dive models for dive phase detection
diveNo <- 255
diveX <- as.data.frame(extractDive(dcalib, diveNo=diveNo))
diveX.m <- cbind(as.numeric(row.names(diveX[-c(1, nrow(diveX)), ])),
diveX$depth[-c(1, nrow(diveX))],
diveX$time[-c(1, nrow(diveX))])
## calibrateDepth() default unimodal regression. Number of inner knots is
## either 10 or the number of samples in the dive, whichever is larger.
(phases.uni <- diveMove:::.cutDive(diveX.m, smooth.par=0.2, knot.factor=20,
dive.model="unimodal",
descent.crit.q=0.01, ascent.crit.q=0))
## Smoothing spline model, using default smoothing parameter.
(phases.spl <- diveMove:::.cutDive(diveX.m, smooth.par=0.2, knot.factor=20,
dive.model="smooth.spline",
descent.crit.q=0.01, ascent.crit.q=0))
plotDiveModel(phases.spl,
diveNo=paste(diveNo, ", smooth.par=", 0.2, sep=""))
plotDiveModel(phases.uni, diveNo=paste(diveNo))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.