Learn R Programming

scuba (version 1.8-0)

durations.dive: Durations of time between each waypoint of a dive

Description

Extracts, or alters, the durations of each interval between waypoints during a dive.

Usage

durations.dive(d) durations.dive(d) <- value

Arguments

d
A dive (object of class "dive").
value
A numeric vector containing durations in minutes.

Value

durations.dive returns a numeric vector containing the durations of intervals between each waypoint, in minutes.

Details

An object of class "dive" represents a scuba dive. It is created by the function dive. A dive is defined as a series of waypoints occurring at specified depths and times.

The duration of the time interval between each successive pair of waypoints is returned by durations.dive. The assignment durations.dive(d) <- value alters these durations, provided the new vector value has the same length as the old one.

See Also

depths.dive, times.dive, dive.

Examples

Run this code
   d <- dive(c(30,20), c(5,5))
   d
   durations.dive(d)
   # what if we stayed at the bottom for 25 minutes instead of 20?
   durations.dive(d)[2] <- 25
   d

Run the code above in your browser using DataLab