plotDiveModel-methods: Methods for plotting models of dive phases

Description Usage Arguments Methods Author(s) See Also Examples

Description

Methods for function plotDiveModel.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S4 method for signature 'diveModel,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)

## S4 method for signature 'TDRcalibrate,missing'
plotDiveModel(x, diveNo)

Arguments

x

A diveModel (diveMode,missing method), numeric vector of time step observations (numeric,numeric method), or TDRcalibrate object (TDRcalibrate,numeric method).

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 diveModel).

depths.s

numeric vector with smoothed depth (see diveModel).

d.crit

integer denoting the index where descent ends in the observed time series (see diveModel).

a.crit

integer denoting the index where ascent begins in the observed time series (see diveModel).

times.deriv

numeric vector representing the time steps where the derivative of the smoothing spline was evaluated (see diveModel).

depths.deriv

numeric vector representing the derivative of the smoothing spline evaluated at times.deriv (see diveModel).

d.crit.rate

numeric scalar: vertical rate of descent corresponding to the quantile used (see diveModel).

a.crit.rate

numeric scalar: vertical rate of ascent corresponding to the quantile used (see diveModel).

Methods

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.

signature(x = "diveModel", y = "missing")

Given a diveModel object and (possibly) the dive number that it corresponds to, the plot shows the model data.

signature(x = "numeric", y = "numeric")

This is the main method, which requires all aspects of the model to be provided.

signature(x = "TDRcalibrate", y = "missing")

Given a TDRcalibrate 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 through plotTDR when what="dive.model".

Author(s)

Sebastian P. Luque spluque@gmail.com

See Also

diveModel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Continuing the Example from '?calibrateDepth':
utils::example("calibrateDepth", package="diveMove",
               ask=FALSE, echo=FALSE)

## 'diveModel' method
dm <- getDiveModel(dcalib, 100)
plotDiveModel(dm, diveNo=100)

## 'TDRcalibrate' method
plotDiveModel(dcalib, diveNo=100)

diveMove documentation built on May 2, 2019, 4:47 p.m.