PlotSamplingVariables: Plot sampling variables

View source: R/StoxPlots.R

PlotSamplingVariablesR Documentation

Plot sampling variables

Description

Plots a barplot for a sample quantity, illustrating the number of samples that has the sample variables in 'ReportFdaSamplingData'. If the fishery is partitioned by grouping variables a stacked barplot is produced. Total landings may be plotted on a secondary axis.

Usage

PlotSamplingVariables(
  ReportFdaSamplingData,
  Quantity = c("Catches", "Vessels", "WeightMeasurements", "LengthMeasurements",
    "AgeReadings", "WeightOfSampledCatches"),
  Landings = FALSE
)

Arguments

ReportFdaSamplingData

ReportFdaSamplingData with sampling report to plot

Quantity

the sample quantity to plot for each sampling variable: "Catches", "Vessels", "WeightMeasurements", "LengthMeasurements", "AgeReadings", or "WeightOfSampledCatches"

Landings

if TRUE total landings in each part of the fishery ('GroupingVariables' in ReportFdaSamplingData) is plotted on a secondary axis.

Value

PlotSamplingVariablesData

See Also

Provide data for this plot with ReportFdaSampling

Examples

 #Plot to inspect how many samples (catches) where taken for each producttype
 samplingReport <- RstoxFDA::ReportFdaSampling(RstoxFDA::StoxBioticDataExample, 
           RstoxFDA::StoxLandingDataExample, 
           GroupingVariables = c("Quarter", "GearGroup"), SamplingVariables=c("sampleproducttype"))
 PlotSamplingVariables(samplingReport, Quantity = "Catches", Landings = TRUE)

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