AIreport: Adult Index Report

View source: R/AIreport.R

AIreportR Documentation

Adult Index Report

Description

Create a draft template-style report of the Adult Index estimates of sea lamprey in the Great Lakes.

Usage

AIreport(
  streamPEs,
  lakeIPEs,
  targets,
  csvDir,
  outFile = NULL,
  proptargets = NULL
)

Arguments

streamPEs

A data frame of "complete" stream mark-recapture estimates (meaning all contributions to the Adult Indices have already been calculated). The data frame must include: year, lake, lake-stream ID lscode (see details), population estimate PEmr, coefficient of variation CVmr (100% * sqrt(variance(PEmr)) / PEmr), index, a logical identifying the index streams; maintain a logical identifying the streams that will continue to have ongoing trapping even if not part of the Adult Index; indexContrib a numeric, the stream population estimate that will be used in the Adult Index (NA for new); indexContribCV a numeric, the stream CV that will be used to generate 95% confidence intervals for the Adult Index (NA for new); and complete a logical identifying streams and years for which the Adult Index has already been estimated (should be all TRUE).

lakeIPEs

A data frame of annual lake-wide Adult Indices with 8 columns: lake, year, the Adult Index index, its associated lower and upper 95% confidence interval ilo and ihi, and the corresponding expansion to a supposed population estimate, pe, pelo and pehi. The data frame may contain variables other than those required.

targets

A data frame with the calculated targets for the Adult Index and expanded PE of each Great Lake, with 5 rows (Superior, Michigan, Huron, Erie, Ontario) and 2 columns: lake and targInd, typically the output from AItarget.

csvDir

A character scalar identifying the path where the rtf file will be stored, e.g., csvDir = "C:\temp\mydir".

outFile

Name of the output rtf file, default NULL, in which case the file will be named "YYYY Adult Index - draft report.doc" where YYYY is the latest year represented in streamDat.

proptargets

A data frame with any proposed targets for the Adult Index, with 2 columns lake and targInd, default NULL. May have from zero to several rows for a single Great Lake.

Details

Lake-stream IDs are combination of lake ID and stream ID e.g., 1.064 = lake ID + (stream ID)/1000.

Value

A draft report document as an rtf file (with the file type *.doc, so that MS Word will open it automatically).


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