F.lifestage.passage.forkLength: F.lifestage.passage.forkLength

F.lifestage.passage.forkLengthR Documentation

F.lifestage.passage.forkLength

Description

Estimate production by fork-length group and Fall run for all days within a date range.

Usage

F.lifestage.passage.forkLength(
  site,
  taxon,
  min.date,
  max.date,
  by,
  output.file,
  ci = TRUE,
  enhmodel = FALSE,
  autols = FALSE,
  nls = NULL,
  weightuse = NULL
)

Arguments

site

The identification number of the site for which estimates are required.

taxon

The species identifier indicating the type of fish of interest. This is always 161980; i.e., Chinook Salmon.

min.date

The start date for data to include. This is a text string in the format %Y-%m-%d, or YYYY-MM-DD.

max.date

The end date for data to include. Same format as min.date.

by

A text string indicating the temporal unit over which daily estimated catch is to be summarized. Can be one of "day", "week", "month", "year".

output.file

A text string indicating a prefix to append to all output.

ci

A logical indicating if 95% bootstrapped confidence intervals should be estimated along with passage estimates.

enhmodel

A logical indicating if enhanced efficiency models should be used to estimate trap efficiencies. Default is TRUE.

autols

Default of FALSE leads to no assigning of no analytical life stage. If TRUE, assignment of analytical life stage is performed. See Details.

nls

Number of life stage groups to estimate. Ignored if autols=FALSE. See Details.

weightuse

A logical indicating if variable weight should be used for the analytical life stage assignment; the default is NULL. Ignored if autols=FALSE. See Details.

Details

Function F.lifestage.passage.forkLength is the main workhorse function for estimating passage with respect to forklength groups, restricted to Fall run. As such, it calls several separate functions, some of which contain queries designed to run against an Access database.

Generally, queries against a database comprise two main efforts. The first involves a query for efficiency trial data, generally called "release" data, and conducted via function F.get.release.data, while the second queries for catch data via function F.get.catch.data.

Once catch data are obtained, fish are partitioned as to whether or not they were assigned and caught during a half-cone operation. Function F.est.passage wraps the functions that conduct the actual passage estimation, which involves statistical fits of each of catch and efficiency over time.

All calls to function F.run.passage result in daily passage estimates, and courser temporal estimates, based on the value specified via by. Regardless of the temporal partitioning, estimates are always additionally summarized by year. Function runs with by specified as "year" output only one set of annual estimates.

The difference between the specified max.date and min.date must be less than or equal to 366 days, as calculated via function difftime.

Selection of "week" for input variable by results in weeks displayed as customized Julian weeks, where weeks number 1-53. The specific mapping of days to weeks can be found within the Dates table of any associated CAMP Access database.

Forklength groupings are specified via global variable forkLengthCutPoints in GlobalVars, and by default, include up to four distinct groupings. However, if no fish exist for a particular grouping, no output associated with that grouping is created. When reclassify=TRUE, the biologically recorded lifeStage is redefined via groups specifed in data frame forkLengthCutPoints, as defined in GlobalVars. Default behavior leads to four separate fork-length-based groups. Similar to reports that break out totals by biologically assigned lifeStages, reports utilizing breakout by fork length may not report totals for all four groups, if the river and date range specified caught no fish with that particular range of fork lengths. The remapping of lifeStage to reflect fork-length-based groupings is performed by function reclassifyLS.

Value

A csv table of passage estimates over the specified date range, with fork-length groups down the rows, and Fall run across the columns. A png displaying proportion-of-catch bar charts of Fall run and fork-length groups. For each run and fork-length-group combination found within the specified data range, an additional series of output. A csv of daily passage estimates for all traps operating at least one day, and catching at least one fish, for all days within the specified date range. A png of catch versus time, for all inclusive traps. A png of daily efficiency estimates, and accompanying csv for all traps operating at least one day, and catching at least one fish, for all days within the specified time period. Finally, a bar chart of passage summarizing catch over the time period specified via by.

Author(s)

WEST Inc.

See Also

F.get.release.data, F.get.catch.data, F.est.passage

Examples

## Not run: 
#   ---- Estimate passage of Fall run based on fork-length groups
#   ---- on the American.
site <- 57000
taxon <- 161980
min.date <- "2013-01-01"
max.date <- "2013-06-01"
by <- "week"
output.file <- NA
ci <- TRUE
nls <- NULL
weightuse <- NULL
autols <- FALSE
reclassifyFL <- TRUE

F.lifestage.passage.forkLength(site,taxon,min.date,max.date,by,
  output.file,ci,nls,weightuse,autols,reclassify)

## End(Not run)

tmcd82070/CAMP_RST documentation built on April 6, 2022, 12:07 a.m.