filter_stepwise: Bin and filter light measurements

View source: R/filter_stepwise.R

filter_stepwiseR Documentation

Bin and filter light measurements

Description

filter_stepwise aggregates light measurements from a single cast into depth bins using a specificed function (e.g. 'median'), removes light measurements using a stepwise algorithm, and assigns data continuity grades based on a threshold criteria.

Usage

filter_stepwise(
  cast.data,
  light.col,
  depth.col,
  id.cols = c("vessel", "cruise", "haul", "updown"),
  bin.size = 2,
  bin.gap = 6,
  agg.fun,
  filter = T,
  ...
)

Arguments

cast.data

Data frame containing light measurements and depth.

bin.size

The size of the depth bin used for aggregation. Default = 2.

bin.gap

The maximum size of data gap before a profile is considered to not meet continuity standards. Units are in units of depth, not the number of bins. Default = 6.

agg.fun

Function used to aggregate light measurements for each depth bin.

...

Additional arguments passed to findInterval function for binning light measurements

Value

Data frame with light by depth bin and continuity grade (1 = Good, -999 = Bad)

Author(s)

Sean Rohan sean.rohan@noaa.gov


sean-rohan/trawllight documentation built on Jan. 13, 2023, 10:43 p.m.