| F.summarize.passage | R Documentation |
Average passage over all traps at a site, then sum by the
temporal unit specified by variable summarize.by.
F.summarize.passage(df, summarize.by)
df |
The data frame containing days which are to be summarized via the
temporal unit specified by |
summarize.by |
A string time unit into which summary occurs, i.e., one
of " |
The dataframe fed to function F.summarize.passage must have a
day-fished POSIX column batchDate, formatted via the ISO 8601 date
format (%F), and a column imputed.catch, containing the
percentage of the total count of the Total Estimated Catch obtained via
imputation. Note that this date format requires a four-digit year.
Additionally, the dataframe must contain estimated passage
via variable passage.
Function F.summarize.passage first averages the passage on a per-day
basis over all traps running on that day. It then summarizes over those
days via the temporal units specified by summarize.by. See Examples.
By default, passage estimation involving life stage always takes place over a year.
The Total Estimated Catch is the sum of Assigned, Unassigned, Half-Cone Adjusted, and Imputed Fish. It is also the numerator utilized in the estimation of passage, where the denominator is the estimated efficiency.
A data frame containing summarized passage, per the time unit
specified via summarize.by.
## Not run:
# ---- Create a data set of trapping.
beg <- strptime("2014-01-24",format="%F")
df <- data.frame(trapVisitID=c(seq(1234,length.out=10)),
trapPositionID=c(rep(12345,10),rep(98765,10)),
batchDate=rep(seq(beg,by=60*60*24,length.out=10),2),
imputed.catch=c(0,0,0,0.1,0,0,1.0,1.0,0,0,0,0,0,0.1,0,0,0,0,0,1),
passage=c(11,11,14,16,12,10,23,18,17,18,3,5,2,7,5,4,1,3,1,1))
df <- df[order(df$batchDate,df$trapPositionID),]
# ---- Summarize by different time frames.
df.day <- F.summarize.passage( df, "day" )
df.month <- F.summarize.passage( df, "month" )
df.year <- F.summarize.passage( df, "year" )
---- Need Julian weeks to compute this particular example.
df.week <- F.summarize.passage( df, "week" )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.