combine_tows: Combine data with multiple records for unique tows

View source: R/combine_tows.R

combine_towsR Documentation

Combine data with multiple records for unique tows

Description

Combine catch data by trawl_id for data pulled using the pull_catch function. Generally, only a single tow is returned by species and in those instances this function is not needed. For example, if data are pulled with all sample_types included, then there will often be data from the same trawl_id included as multiple records. In these instances, this function allows for the sample data to be combined for each unique trawl_id. This also occurs if cryptic species pairs are all returned (e.g., rougheye rockfish and blackspotted rockfish)

Usage

combine_tows(data, dir = NULL, single_species = TRUE, verbose = TRUE)

Arguments

data

A data frame of catches obtained by using the pull_catch function.

dir

Directory where output will be saved. The directory where the file should be saved. If dir = NULL no output will be saved.

single_species

TRUE/FALSE Logical that indicates whether data should be grouped by trawl_id alone (TRUE, e.g., rougheye rockfish and blackspotted rockfish) or data should be grouped by ⁠common name⁠ and trawl_id (FALSE).

verbose

A logical that specifies if you want to print messages and warnings to the console. The default is TRUE.

Author(s)

Chantel Wetzel


nwfsc-assess/nwfscSurvey documentation built on Nov. 12, 2024, 8:14 p.m.