These functions are not meant to be called directly by the
user, as he/she could not care less (right?). This may change in the
future. Nonetheless, they can be called in the usual way for
functions that are not exported: diveMove:::.functionName.
.depthFilter performs the zero-offset correction with
method=“filter”. It takes a numeric vector and applies a
running quantile to it, and the process is repeated zero or more times
on the filtered/smooth vector from the previous process.
.derivStats obtains summary statistics (summary() and sd()) of
derivatives for descent, bottom, and ascent phases for each dive.
It takes a TDRcalibrate object.
.diveIndices takes a numeric vector with sequences of dive
numbers, and selects the indices of dive numbers listed uniquely in
the vector given as its second argument.
.diveMatches takes a numeric or character vector with sequences
of dive numbers, and selects the indices of dive numbers listed
uniquely in the vector given as its first argument. Stops if no
matches are found, and warns if some were ignored.
.getInterval takes a POSIXct object and
calculates the the most frequent interval between successive elements.
.plotTDR is the underlying plotting function for
TDR objects. Arguments are documented in the main S4
method (plotTDR).
.plotZOCfilters and plotZOCtdrs are the underlying
plotting functions for visually assessing the ZOC procedure.
Arguments are documented in the main S4 methods
(plotZOC).
.speedStats takes matrix of time and speed, and an optional
vector of vertical distance travelled between segments, and calculates
the total vertical distance travelled, mean speed, and angle. Input
and output correspond to a single section of a dive.
.night takes a POSIXct object, sunrise and sunset
time strings to provide a list of sunrise and sunset times for each
day in the POSIXct input.
.rleActivity takes a factor indicating different activity
phases, their associated time, and the sampling interval to return a
factor uniquely identifying each phase of activity, i.e. labelling
them. In addition, it returns the duration of each phase, and their
beginning and end times.
.speedNames is a character vector with possible names for a
speed vector.
.speedCol takes a data.frame and checks whether
there is a column with a name matching one of those in
.speedNames.
.zoc is the main workhorse for the zero-offset correction
ZOC procedure in calibrateDepth. It takes a
POSIXct object, corresponding numeric
depth vector, a string representing a method to use for the procedure,
and a list of control parameters for the chosen method to perform ZOC.