TDRcalibrate-class {diveMove}R Documentation

Class "TDRcalibrate" for dive analysis

Description

This class holds information produced at various stages of dive analysis. Methods are provided for extracting data from each slot.

Usage

## S4 method for signature 'TDRcalibrate, logical':
attendance(obj, ignoreZ)
## S4 method for signature 'TDRcalibrate, numeric,
##   missing':
extractDive(obj, diveNo)
## S4 method for signature 'TDRcalibrate, missing':
getDAct(x)
## S4 method for signature 'TDRcalibrate, character':
getDAct(x, y)
## S4 method for signature 'TDRcalibrate, missing':
getDPhaseLab(x)
## S4 method for signature 'TDRcalibrate, numeric':
getDPhaseLab(x, diveNo)
## S4 method for signature 'TDRcalibrate, missing':
getGAct(x)
## S4 method for signature 'TDRcalibrate, character':
getGAct(x, y)
## S4 method for signature 'TDRcalibrate, missing':
plot(x, diveNo=seq(unique(getDAct(x, "dive.id"))),
     labels="phase.id", surface=FALSE, ...)

Arguments

x, obj "TDRcalibrate" object.
ignoreZ logical indicating whether to ignore trivial aquatic periods.
diveNo numeric vector with dive numbers to plot.
labels one of “phase.id” or “dive.phase”, specifying whether to label observations based on the gross phase ID of the "TDR" object, or based on each dive phase, respectively.
surface logical indicating whether to plot surface readings.
... further arguments to plotDive.
y string; “dive.id”, “dive.activity”, or “postdive.id” in the case of getDAct, to extract the numeric dive ID, the factor identifying dive phases in each dive, or the numeric postdive ID, respectively. In the case of getGAct it should be one of “phase.id”, “trip.act”, “trip.beg”, or “trip.end”, to extract the numeric phase ID for each observation, a factor indicating what major activity the observation corresponds to, or the beginning and end times of each phase in the record, respectively.

Details

This is perhaps the most important class in diveMove, as it holds all the information necessary for calculating requested summaries for a TDR.

The tdr slot contains the time, zero-offset corrected depth, and possibly calibrated or uncalibrated speed. See readTDR and the accessor function getTDR for this slot. Convenient access to each vector in this slot is available through getTime, getDepth, and getSpeed.

The slot gross.activity holds, as a list, a vector (named phase.id) numbering each major activity phase found in the record, a factor (named trip.act) labelling each row as being on-land, at-sea, or leisure at-sea activity. These two elements are as long as there are rows in tdr. This slot also contains two more vectors: one with the beginning time of each phase, and another with the ending time; both represented as POSIXct objects. See detPhase.

The slot dive.activity contains a data.frame, again with as many rows as those in tdr, consisting of three vectors named: dive.id, which is an integer vector, sequentially numbering each dive (rows that are not part of a dive are labelled 0), dive.activity is a factor which completes that in trip.act above, further identifying rows in the record belonging to a dive. The third vector in dive.activity is an integer vector sequentially numbering each postdive interval (all rows that belong to a dive are labelled 0). See detDive, and getDAct to access all or any one of these vectors.

dive.phases is a slot corresponding to a factor that labels each row in the record as belonging to a particular phase of a dive. See labDivePhase, and getDPhaseLab to access this slot.

land.threshold, sea.threshold, dive.threshold, and speed.calib.coefs are each a single number representing parameters used for detecting phases, and calibrating the TDR. Except for the latter, these are mostly for internal use, and hence do not have an accessor function. See getSpeedCoef for accessing speed.calib.coefs.

The plot method for this class creates an interactive plot of the "TDR" object, labelling the identified observations with a chosen factor from the corresponding "TDRcalibrate" object. The argument surface allows for the inclusion/exclusion of identified surface readings.

Objects from the Class

Objects can be created by calls of the form new("TDRcalibrate", ...). The objects of this class contain information necessary to divide the record into sections (e.g. land/water), dive/surface, and different sections within dives. They also contain the parameters used to calibrate speed and criteria to divide the record into phases.

Slots

tdr:
Object of class "TDR", with concurrent time, depth, and possibly speed (if "TDRspeed"). See Details.
gross.activity:
Object of class "list", must be the same as value returned by detPhase.
dive.activity:
Object of class "data.frame", must be the same as value returned by detDive.
dive.phases:
Object of class "factor", must be the same as value returned by labDivePhase.
land.threshold:
Object of class "numeric" the temporal criteria used for detecting periods on land that should be considered as at-sea.
sea.threshold:
Object of class "numeric" the temporal criteria used for detecting periods at-sea that should not be considered as foraging time.
dive.threshold:
Object of class "numeric" the criteria used for defining a dive.
speed.calib.coefs:
Object of class "numeric" the intercept and slope derived from the speed calibration procedure.

Methods

attendance
signature(obj = "TDRcalibrate", ignoreZ = "logical"): generates an attendance table for the TDR record; the duration of each dry and wet phase.
getDAct
signature(x = "TDRcalibrate", y = "missing"): extracts a data frame with vectors identifying all readings to a particular dive and postdive number, and a factor identifying all readings to a particular activity.
getDAct
signature(x = "TDRcalibrate", y = "character"): as the method for missing y, but selects a particular vector to extract.
getDPhaseLab
signature(x = "TDRcalibrate", diveNo = "missing"): extracts a factor identifying all readings to a particular dive phase.
getDPhaseLab
signature(x = "TDRcalibrate", diveNo = "numeric"): as the method for missing y, but selects data from a particular dive number to extract.
extractDive
signature(obj = "TDRcalibrate", diveNo = "numeric", id = "missing"): extract particular dives.
getGAct
signature(x = "TDRcalibrate", y = "missing"): extracts elements that divide the data into major wet and dry activities.
getGAct
signature(x = "TDRcalibrate", y = "character"): as the method for missing y, but extracts particular elements.
show
signature(object = "TDRcalibrate"): prints informative summary of the data.
getTDR
signature(x = "TDRcalibrate"): extracts the TDR object.
getSpeedCoef
signature(x = "TDRcalibrate"): extracts the speed calibration coefficients.
plot
signature(x = "TDRcalibrate", y = "missing"): plot the TDR object, labelling identified sections of it (see Usage and Details).

Author(s)

Sebastian P. Luque spluque@gmail.com

See Also

TDR-class for links to other classes in the package


[Package diveMove version 0.6-2 Index]