trim_msom: Trim trawl data for msom

Description Usage Arguments Value

View source: R/trim_msom.R

Description

Performs the trawlTrim function the clean region data, then trims down to species (not genera) that have been observed at least 10 times. Does aggregating within a haul/ spp using trawlAgg. Adds an abundance column, which is actually just 0 if wtcpue == 0, and 1 if wtcpue > 0.

Usage

1
2
3
trim_msom(reg, gridSize = 1, grid_stratum = TRUE, depthStratum = NULL,
  tolFraction = 1/3, plot = FALSE, cull_show_up = FALSE,
  trimYears = TRUE, trimDOY = TRUE)

Arguments

reg

Character name of region or data.table to be passed to trawlTrim.

gridSize

numeric grid size to be passed to ll2strat

grid_stratum

logical, default TRUE; whether or not the strata should be defined on a grid, or used original stratum definition

depthStratum

The depth range to use to define stratum; the default does not use depth at all. If using, a reasonable value might be 100.

tolFraction

The fraction of years that a stratum can not be sampled yet still be included in output. Default is 1/3, indicating that a stratum will be included in output so long as it is sampled for at least 2/3 of years. Actual number of years tolerated is rounded up. This value determines the strat_tol argument in check_strat

plot

Logical, default FALSE; for check_strat, should the stratum tolerance be plotted?

cull_show_up

Logical, default FALSE; should spp in show_up_spp be removed when trimming?

trimYears

Default TRUE; trim data set to a pre-determined range of years?

trimDOY

Default TRUE; trim data set to hauls occurring within a certain range of day of year?

Value

A data.table


rBatt/trawlDiversity documentation built on Aug. 14, 2021, 1:01 p.m.