DWEFreport: Generate Estimates from the Deepwater Electrofishing Data

View source: R/DWEFreport.R

DWEFreportR Documentation

Generate Estimates from the Deepwater Electrofishing Data

Description

Generate Estimates of larval sea lamprey abundance from the deepwater electofishing data.

Usage

DWEFreport(
  Dir,
  CatchClean,
  LengthsClean,
  Plots,
  CatHist,
  LenHist,
  PlotHist,
  PEHist,
  Downstream,
  Errors,
  Outfiles,
  yrz.f = "2002, 2003, 2008, 2012, 2017, and 2022",
  mu.f = 0.560772823,
  sigma.f = 0.492926007,
  StratArea = SMRStratArea,
  bkill = 0.75
)

Arguments

Dir

A character scalar identifying the path where output files will be stored. Use forward slashes, e.g., Dir = "C:/temp/mydir".

CatchClean

A data frame with the cleaned catch data, typically the CAT2 output from DWEFerror.

LengthsClean

A data frame with the cleaned lengths data, including information from larvae only (no metamorphosing juveniles), typically the LEN2 output from DWEFerror.

Plots

A data frame with the plot data, typically the PLT output from DWEFerror.

CatHist

A data frame with the historic catch data, typically the CAThist output from DWEFerror.

LenHist

A data frame with the historic lengths data, typically the LENhist output from DWEFerror.

PlotHist

A data frame with the historic plot-specific estimates, typically the Plothist output from DWEFerror.

PEHist

A data frame with the historic whole river population estimates, typically the PEhist output from DWEFerror.

Downstream

Logical scalar indicating whether the downstream portion of the St. Marys River was surveyed (TRUE) or if just the upstream portion of the river was surveyed (FALSE).

Errors

A character vector of table numbers corresponding to the document produced by DWEFerror, indicating unresolved errors remaining the DWEF data, typically the ERR output from DWEFerror.

Outfiles

A character vector of length seven with names for the new catch, lengths, and plot output csv files, and the updated catch, lengths, plot, and whole river population output csv files. Note that updates to the whole river population files assume post-treatment sampling only, other situations will yield missing values for estimates.

yrz.f

A character scalar listing the years on which the parameters mu.f and sigma.f (upper river to whole river expansion factors) are based.

mu.f

A numeric scalar representing the upper-to-whole river expansion factor based on the average ratio of mean larval densities from the whole river to the upper river from all the years that the lower St. Marys River was sampled.

sigma.f

A numeric scalar representing the upper-to-whole river expansion factor based on the average ratio of the standard deviation of the larval densities from the whole river to the upper river from all the years that the lower St. Marys River was sampled.

StratArea

Data frame with three variables: inbplot indicating whether the stratum is in (=1) a high larval density area or not (=0), region indicating the general location in the river (1 = North Channel, 2 = turning basin, 3 = widening part, 4 = Neebish channels, and 5 = most upstream part), and haStrat area of the stratum in hectares. Strata of the St. Marys River larval sea lamprey survey are defined by region and inbplot. By default the 2013 areas are provided, SMRStratArea.

bkill

Numeric scalar indicating the assumed effectiveness of Bayluscide in treated plots, expressed as the proportion of larval sea lampreys killed, default 0.75.

Details

It is assumed that this function will be run immediately after the DWEFerror function, in which case the rtf file created by DWEFerror will be continued and completed by DWEFreport.

Value

Six csv files are written to Dir, with the final catch, lengths, and plot data for the latest year as well as the updated historic catch, lengths, and PE files.


JVAdams/GLFC documentation built on Jan. 5, 2023, 12:59 a.m.