F.get.release.data: F.get.release.data

F.get.release.dataR Documentation

F.get.release.data

Description

Fetch data on efficiency trials from an Access database.

Usage

F.get.release.data(site, taxon, min.date, max.date, visit.df)

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.

visit.df

A data frame resulting from the catch SQL sequence, specially adapted to have an attribute data frame fl0 attached, containing trapVisitID-specific mean fork lengths.

Details

Function F.get.release.data utilizes query sequences Build Report Criteria and Build Report Criteria Release to obtain all results within the specified min.date and max.date. See section Structured Query Language (SQL) Queries in function F.run.sqlFile for more details.

Query results include one record for every trap visit within a releaseTime, say 7 days, even if the trap visit did not catch any marked fish. In this case, zeros are recorded for all combinations of releaseID, trapPositionID, and trapVisitID.

Given a specific release, the resulting data frame tells how many fish from the release were captured on subsequent trap visits, for each trap. These result from collapsing all trap visits and computing the total number of each release's captured fish. Note that generally, at any one time, more than one release can "go," and so a single trap visit may catch fish from multiple releases. Total recaptures are summarized over unique combinations of trap visits and positions, via variables releaseID and trapPositionID.

Release records need to have both variables IncludeTest and IncludeCatch flagged as "Yes" for inclusion in efficiency estimation. Recaptures that took place during half-cone operations are multiplied by the value of the halfConeMulti global variable, which is set at 2. Half cone operations are identified by variable HalfCone having a value of "Yes".

Variables HrsToFirstVisitAfter and HrsToLastVisitAfter are used in function F.est.efficiency as helper variables to derive a batch date when the meanEndTime variable is NA.

Value

A data frame summarizing efficiency trials for the site of interest for all traps between the dates indicated. Data include Recaps numerators and nReleased denominators.

Mean Recapture Time

The mean recapture time is estimated for each unique grouping of releaseID and trapPositionID. In the case of no recaptures, the mean recapture time is recorded as NA. In all other cases, the mean recapture time is calculated as the weighted mean of recapture times, weighting on the number of caught fish. For example, suppose fishing takes place at a particular trap over 7 consecutive days. If the bulk of fish were caught on day 7, then the mean recapture time would be near that 7th day of fishing. This is in contrast to a "straight" mean recapture time, which would estimate a mean recapture time 3.5 days after the start of fishing, regardless of the temporal distribution of captured fish over the entire 7-day period.

Author(s)

WEST Inc.

See Also

F.run.sqlFile, F.summarize.releases, F.release.summary

Examples

## Not run: 
#   ---- Fetch all Chinook salmon efficiency data on the American River 
#   ---- between Jan. 16, 2013 and June 8th, 2013.  
site <- 57000
taxon <- 161980
min.date <- "2013-01-01"
max.date <- "2013-06-01"
visit.df <- visitDF
df <- F.get.release.data(site,taxon,min.date,max.date,visit.df=visit.df)

## End(Not run)

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