Learn R Programming

diveMove (version 1.3.1)

extractDive-methods: Extract Dives from "TDR" or "TDRcalibrate" Objects

Description

Extract data corresponding to a particular dive(s), referred to by number.

Usage

## S3 method for class 'TDR,numeric,numeric':
extractDive(obj, diveNo, id)
## S3 method for class 'TDRcalibrate,numeric,missing':
extractDive(obj, diveNo)

Arguments

obj
TDR object.
diveNo
numeric vector or scalar with dive numbers to extract.
id
numeric vector or scalar of dive numbers from where diveNo should be chosen.

Value

Examples

Run this code
## Continuing the Example from '?calibrateDepth':
utils::example("calibrateDepth", package="diveMove",
               ask=FALSE, echo=FALSE)
dcalib		# the 'TDRcalibrate' that was created

diveX <- extractDive(divesTDR, 9, getDAct(dcalib, "dive.id"))
plotTDR(diveX, interact=FALSE)

diveX <- extractDive(dcalib, 5:10)
plotTDR(diveX, interact=FALSE)

Run the code above in your browser using DataLab