plotDiveModel,diveModel,missing-method {diveMove} | R Documentation |
Methods for plotting models of dive phases
Description
All methods produce a double panel plot. The top panel shows the depth against time, the cubic spline smoother, the identified descent and ascent phases (which form the basis for identifying the rest of the dive phases), while the bottom panel shows the first derivative of the smooth trace.
Usage
## S4 method for signature 'diveModel,missing'
plotDiveModel(x, diveNo)
## S4 method for signature 'TDRcalibrate,missing'
plotDiveModel(x, diveNo)
## S4 method for signature 'numeric,numeric'
plotDiveModel(
x,
y,
times.s,
depths.s,
d.crit,
a.crit,
diveNo = 1,
times.deriv,
depths.deriv,
d.crit.rate,
a.crit.rate
)
Arguments
x |
A |
diveNo |
integer representing the dive number selected for plotting. |
y |
numeric vector with depth observations at each time step. |
times.s |
numeric vector with time steps used to generate the
smoothing spline (i.e. the knots, see |
depths.s |
numeric vector with smoothed depth (see
|
d.crit |
integer denoting the index where descent ends in the
observed time series (see |
a.crit |
integer denoting the index where ascent begins in the
observed time series (see |
times.deriv |
numeric vector representing the time steps where the
derivative of the smoothing spline was evaluated (see
|
depths.deriv |
numeric vector representing the derivative of the
smoothing spline evaluated at |
d.crit.rate |
numeric scalar: vertical rate of descent
corresponding to the quantile used (see |
a.crit.rate |
numeric scalar: vertical rate of ascent
corresponding to the quantile used (see |
Methods (by class)
-
x = diveModel,y = missing
: Given adiveModel
object and (possibly) the dive number that it corresponds to, the plot shows the model data. -
x = TDRcalibrate,y = missing
: Given aTDRcalibrate
object and a dive number to extract from it, this method plots the observed data and the model. The intended use of this method is throughplotTDR
whenwhat="dive.model"
. -
x = numeric,y = numeric
: Base method, requiring all aspects of the model to be provided.
Author(s)
Sebastian P. Luque spluque@gmail.com
See Also
Examples
## Too long for checks
## Continuing the Example from '?calibrateDepth':
utils::example("calibrateDepth", package="diveMove",
ask=FALSE, echo=FALSE, run.donttest=TRUE)
## 'diveModel' method
dm <- getDiveModel(dcalib, 100)
plotDiveModel(dm, diveNo=100)
## 'TDRcalibrate' method
plotDiveModel(dcalib, diveNo=100)