tabulateFisheries: Tabulate fisheries

View source: R/landingsAnalyses.R

tabulateFisheriesR Documentation

Tabulate fisheries

Description

Tabulates fisheries based on custom cell definitions

Usage

tabulateFisheries(
  data,
  weightCol = "LiveWeightKG",
  cellCols = c("Metier5", "quarter", "Area"),
  complete = F
)

Arguments

data

data.frame containg fisheries data

weightCol

character() column in 'data' that contains catch weights

cellCols

character() vector of columns in 'data' defining cells

complete

logical() whether all combinations of the columns in cellCols should be tabulated, even if they contain no catch.

Details

A fishery will be decomposed into cells, within which total weight will be reported.

Value

data.table with the cells specified in cellCols tabulated by decreasing weight and with the columns 'weight', 'frac' and 'cumFrac' containing the weight in each cells and the fraction and cumulative fraction of total weight in that cell.

Examples

 data(landings)
 tabulateFisheries(landings)

StoXProject/RstoxFDA documentation built on Nov. 12, 2024, 3:42 a.m.