parse_hauls: Parse Hauls

Description Usage Arguments Value Author(s)

View source: R/parsing.R

Description

For an input object of class 'LoadCellData', parses load cell file data into hauls by splitting apart load cell data based on minimum load, time between hauls, and minimum haul length. Return an object of class 'LoadCellHauls'.

Usage

1
parse_hauls(data, split, min_load, min_time, min_gap, pass)

Arguments

data

An object of class 'LoadCellData' representing data loaded from load cell CSVs.

split

Boolean indicating if CSV files should be split into separate hauls; if a fisherman recorded separate CSVs for each haul, this option would be False and the hauls will be numbered sequentially per day. If True, hauls will be parsed from the CSV data according to options set in the remaining function arguments.

min_load

Numeric - If split is True, load cell data below this threshold will be excluded to create gaps between hauls. If this argument is omitted, the minimum value for each CSV will be used.

min_time

*Optional* Numeric - If split is True, hauls resulting from excluding load values below 'min_load' must be this many seconds in duration to be considered a haul. This is useful for excluding junk data produced by a load cell being jostled in rough seas in between actual hauls.

min_gap

*Optional* Numeric - If split is True, a haul must begin this many seconds after the previous haul to be considered a separate haul.

pass

*Optional* Numeric; if the CSV is less than this many seconds in length, it will not be split and will be assumed to represent a single haul.

Value

An object of class 'LoadCellHauls'. Each item in the class is represented by a unique name constructed by concaternation of the load cell serial number, date, and haul number, ie "SN-2018-03-24-1". Each item has attributes as follows:

haul

The haul number of the data.

data

A dataframe containing the load cell data for the haul.

sn

Serial number of the load cell adapter.

traps

The number of traps per trawl, if entered in the interface.

start_dt

A POSIXlt object representing the start datetime of the haul.

end_dt

A POSIXlt object representing the end datetime of the haul.

seconds

The number of elapsed seconds in the haul.

max_load

An integer representing the maximum load within the haul.

kfactor

The Keliher conversion factor applied to the data.

Author(s)

Bill DeVoe, William.DeVoe@maine.gov


mainedmr/loadcell documentation built on Nov. 13, 2019, 12:34 a.m.