View source: R/StoxReportFunctions.R
ReportFdaSampling | R Documentation |
Report sampling of fisheries against landings in partitions of the fisheries.
ReportFdaSampling(
StoxBioticData,
StoxLandingData,
GroupingVariables = character(),
Decimals = integer(),
Unit = RstoxData::getUnitOptions("mass", conversionRange = c(1, 1e+12)),
SamplingVariables = character()
)
StoxBioticData |
|
StoxLandingData |
|
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 |
SamplingVariables |
Columns of 'StoxBioticData' identifying sampling variables to be use to partition the report. See details. |
Sampling is reported partitioned on the provided 'GroupingVariables', which must be present in both samples (StoxBioticData) and landings (StoxLandingData). If samples are encoded in partitions of the fisheries with no landings. 'LandedRoundWeight' will be NA. This may be due to recording errors or filtering errors, but it may also be due to comparison of similar but unequal category-definitions. For instance area are coded in landings as dominant area for a fishing trip, while at-sea sampling will record area of fishing operation, and the catch from that area by subsequently be landed with another area listed as dominant area.
Note that the columns Catches and Vessels summarize the number of unique catches and vessels in each partition / cell. So depending on which grouping variables are added, the sum of vessels does not have to correspond to the total sum of vessels in the fleet. In principle the same applies to Catches, but in practice that situation does less commonly arise.
In addition sampling may be reported partitioned on the provided 'SamplingVariables'. For instance the variable 'IndividualSex' may be provided to see how many samples are collected for each sex. NAs will be treated as a separate category. When 'SamplingVariables' are provided, each partition specified by 'GroupingVariables' will be reported several times, so that the sum of the column 'LandedRoudnWeight' will not be the total landings. 'SamplingVariables' must be columns that are only present in samples (StoxBioticData), not in landings (StoxLandingData).
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
ReportFdaSamplingData
samplingreport <- RstoxFDA::ReportFdaSampling(RstoxFDA::StoxBioticDataExample,
RstoxFDA::StoxLandingDataExample, GroupingVariables = c("GearGroup"), Unit = "ton")
samplingreport$FisheriesSampling
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.