chop.dive {scuba}R Documentation

Extract Part of a Dive Profile

Description

Extracts only part of a dive profile.

Usage

chop.dive(d, t0=0, t1=max(times.dive(d)))

Arguments

d

The dive. An object of class "dive".

t0, t1

Elapsed times (in minutes) of the start and end of the period which should be extracted.

Details

The argument d should be an object of class "dive" representing a dive profile.

This command extracts the part of the dive profile that starts at time t0 minutes and ends at time t1 minutes, and returns it as an object of class "dive". The clock is adjusted so that the new dive profile starts at time 0 and ends at time t1-t0.

Note that the resulting dive profile does not start and end at the surface: the dive profile is simply chopped off at elapsed time t1. If you want the dive to start and end at the surface, execute dive(chop.dive(d, t0, t1)).

Value

An object of class "dive" starting at time 0 and ending at time t1-t0.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

See Also

dive

Examples

   d <- dive(c(30,20), c(5,5))
   # fragment of dive up to 10 minutes
   chop.dive(d, 0, 10)
   # dive aborted at 10 minutes
   dive(chop.dive(d, 0, 10))

[Package scuba version 1.11-1 Index]