ReportFdaLandings: Report FDA landings

View source: R/StoxReportFunctions.R

ReportFdaLandingsR Documentation

Report FDA landings

Description

Report landings in partitions of the fisheries.

Usage

ReportFdaLandings(
  StoxLandingData,
  GroupingVariables = character(),
  Decimals = integer(),
  Unit = RstoxData::getUnitOptions("mass", conversionRange = c(1, 1e+12))
)

Arguments

StoxLandingData

StoxLandingData data with landings from fisheries and approriate columns added for identifying corresponding samples

GroupingVariables

Columns of 'StoxBioticData' and 'StoxLandingData' that partitions the fisheries. If not provided, a single row for all landings will be produced.

Decimals

integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to 0.

Unit

unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to kg.

Details

Landings are reported partitioned on the provided 'GroupingVariables'.

Landings are sorted by decreasing weight, except if the column 'CatchDate' is used as GroupingVariable. In that case Landings are sorted by increasing date, after sorting on other Grouping variables.

Rounding of numbers according to the argument 'Decimals' is done with round, so that negative numbers specify rounding to powers of ten, and rounding of the digit 5 is towards the even digit.

The units considered valid for weights are those listed for quantity 'mass' in StoxUnits

Value

ReportFdaLandingData

Examples

 landingsreport <- RstoxFDA::ReportFdaLandings(RstoxFDA::StoxLandingDataExample, 
    GroupingVariables = c("Area"), Unit="ton")
 landingsreport$FisheriesLandings

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