resize: Resize an individual

Description Usage Arguments Examples

View source: R/funs_correction.r

Description

resize cuts a ses object: given a set of dives to discard, it remove the according rows from the TDR dataset and the statdive table. The dive and bottom delimitation ("delim" table) is updated as well.

Usage

1
resize(x, no_dv_min = 1, no_dv_max = max(x$delim$no_dive), rm = NULL)

Arguments

x

An object of class ses.

no_dv_min

The number of the first dive to keep.

no_dv_max

The number of the last dive to keep.

rm

Optional. A logical vector of length = nrow(x$delim), where TRUE indicate that dives are to be removed.

Examples

1
2
3
4
5
6
7
8
9
data(exses)
range(exses$tdr$time)
range(abs(exses$delim$no_dive))
range(exses$stat$no_dive)

new.ses <- resize(exses, 50, 55)
range(new.ses$tdr$time)
range(abs(new.ses$delim$no_dive))
range(new.ses$stat$no_dive)

SESman/rbl documentation built on June 24, 2017, 8:48 a.m.