aggregate_to_year: Aggregate data to YEAR and borrow length samples from other...

Description Usage Arguments Value

View source: R/aggregate_to_year.R

Description

If the number of length samples are too sparse at NEGEAR/MARKET_CODE level to retain at QTR year then landings are aggregated to YEAR level. YEARs with missing length samples are filled with length sample data from the closest YEAR

Usage

1
2
3
aggregate_to_year(data, gearType, mainGearType, marketCode, aggYEARData,
  sampleStartYear, missingEarlyYears, proportionMissing, nLengthSamples,
  pValue, outputDir, logfile)

Arguments

data

List. Landings data and length data

gearType

Character string. NEGEAR gear code

mainGearType

Character string. Name of NEGEAR with most landings

marketCode

Character string. MARKET_CODE designation from cfdbs

sampleStartYear

Numeric scalar. Year first length sample was taken

missingEarlyYears

Numeric vector. Years prior to first length sample was taken

proportionMissing

numeric scalar. Proportion of missing samples allowed per YEAR for each MARKET_CODE/GEAR combination). Passed from aggregate_landings

pValue

Numeric scalar. Threshold pvalue for determining significance of ks test for length samples

outputDir

Character string. Path to output directory (png files saved here)

aggYearData

Tibble. (n x 3). YEAR, total landings, presence/absence of min mumber of samples

nLenthSamples

Numeric scalar. Number of length samples deemed to be "enough" for calculations. This is passed from aggregate_landings

logFile

Character string. Specify the name for the log file generated describing all decisions made.

Value

List. Same as input data


NOAA-EDAB/neusCatch documentation built on Nov. 19, 2019, 7:34 p.m.