bottom_delim: Find the dives' bottom start and end

Description Usage Arguments Examples

Description

Find the dives' bottom start and end

Usage

1
2
bottom_delim(obj, method = c("vspd", "haslsey", "bsm", "std"), dvs = NULL,
  ...)

Arguments

obj

An object of class 'ses' or 'tdr'. In the first case the function just returns the delim table of the object if it exists else it computes the delim table from the TDR data. with time and depth variables named "time" and "depth".

method

the method to used. See help for functions in see also section to get details about possible options. When "vspd" or "halsey" methods fails "std" is used instead.

dvs

a delim table such as return by dive_delim. If NULL dive_delim will be used with default arguments to compute one.

...

arguments to be passed to bottom_delim_vspd, bottom_delim_halsey, bottom_delim_bsm or bottom_delim_std according to the specified method.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(exses)
dvs_vspd   <- bottom_delim(exses$tdr)
dvs_halsey <- bottom_delim(exses$tdr, method = "halsey")
dvs_bsm    <- bottom_delim(exses$tdr, method = "bsm")
dvs_std    <- bottom_delim(exses$tdr, method = "std")

# Example using the four methods
n_dv <- 300
opar <- par(no.readonly = TRUE) ; par(mfrow = c(2, 2))
exses$delim <- dvs_vspd
tdrply(plot, 1:2, no = n_dv, obj = exses, main = 'method = "vspd"')
tdrply(points, 1:2, ty = "_", no = n_dv, obj = exses, col = "red")
exses$delim <- dvs_halsey
tdrply(plot, 1:2, no = n_dv, obj = exses, main = 'method = "halsey"')
tdrply(points, 1:2, ty = "_", no = n_dv, obj = exses, col = "red")
exses$delim <- dvs_bsm
tdrply(plot, 1:2, no = n_dv, obj = exses, main = 'method = "bsm"')
tdrply(points, 1:2, ty = "_", no = n_dv, obj = exses, col = "red")
exses$delim <- dvs_std
tdrply(plot, 1:2, no = n_dv, obj = exses, main = 'method = "std"')
tdrply(points, 1:2, ty = "_", no = n_dv, obj = exses, col = "red")
par(opar)

SESman/rbl documentation built on May 9, 2019, 11:10 a.m.