getTimeProp: getTimeProp

View source: R/getTimeProp.r

getTimePropR Documentation

getTimeProp

Description

Shuffle fishing StartTimes and EndTimes with rise and set times associated with one of either sun or moon astrological data.

Usage

getTimeProp(df, rise, set, traps, tmp, metric)

Arguments

df

A data frame of skinny astrological data describing one of either sun or moon rise or set datetimes.

rise

A text string describing the rise time from data frame dates. Either sun or moon rise times.

set

A text string describing the set time from data frame dates. Either sun or moon set times.

traps

A vector of trapPositionIDs over which rise and set data are required.

tmp

A data frame consisting of StartTimes and EndTimes for fishing for the current data run.

metric

A text vector of size one. Typically intended to be one of either "sun" or "moon".

Details

Denominators are defined for each unique trapping instance via variable trapVisitID, and are defined as the length of time in fishing, in minutes. Numerators are the length of time the sun was up, in minutes, given the fishing interval, or the corresponding metric for moon times.

Note that this variable, usually labeled as "SampleMinutes" in results deriving from Connie's SQL queries, varies slightly from Connie's calculated value. Generally, however, the number of deviations is small, given a large sample of unique trapVisitIDs; i.e., fishing instances. In the overwheling majority of cases, the results between Connie's value and here exactly agree.

The temporal dates table is defined via the earliest and latest efficiency trial date for the run in question. To this, an additional month is appended at each end.

Value

A data frame with the proportion of time spent fishing during the day (when the sun was up), or the same when the moon was up.

Author(s)

WEST Inc.

See Also

makeSkinnyTimes

Examples

## Not run: 
dfNew <- getTimeProp(df,rise,set,traps,tmp,metric)

## End(Not run)

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