summarize_catches: summarize_catches

View source: R/summarize_catches.r

summarize_catchesR Documentation

summarize_catches

Description

This function joins together all the rdata files into a single data frame.

Usage

summarize_catches(
  db = NULL,
  morph_dets = FALSE,
  gear_dets = FALSE,
  valid.coords = FALSE,
  quiet = FALSE,
  drop.na.cols = TRUE,
  debug = FALSE,
  env = .GlobalEnv
)

Arguments

db

default is NULL. This identifies the dataset you are working with.

morph_dets

default is FALSE. For some databases, more detailed records can be added for each catch (e.g. gsdet for 'rv' data). This flag indicates that the detailed records will be returned. This means that every catch location might have many records (e.g. length and weight data for all measured fish in a tow). This generally only desired when individual fish properties are needed (e.g. length, weight)

gear_dets

default is FALSE. For some databases (eg isdb), more detailed records can be added for each gear. This means that a single catch will be duplicated multiple times - once for each new gear parameter (e.g. mesh shape, door height, etc). If there's a good reason to show this with catch data, I can't think of it.

valid.coords

default is FALSE. This uses Mar.utils::df.qc.spatial() to remove coordinates that are not valid. If TRUE and no valid records remain, this function will abort.

quiet

default is FALSE. If coordinates are required (valid.coords=TRUE), the script default is to report issues to the user. If quiet=TRUE, these notifications are not shown.

drop.na.cols

default is TRUE. If TRUE, any columns that are do not have any values in them will be dropped.

debug

default is FALSE. If TRUE, messages describing the merging steps will be printed out

env

This the the environment you want this function to work in. The default value is .GlobalEnv.

Value

a data frame, and if req.coords=TRUE, a message indicating how many positions were lost due to the constraint.

Author(s)

Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca

See Also

Other dfo_extractions: get_data(), get_data_custom(), get_survey(), self_filter()


Maritimes/Mar.datawrangling documentation built on April 5, 2025, 1:47 p.m.