View source: R/reduceETrials.r
reduceETrials | R Documentation |
Map the set of efficiency trials to the 1959-1960 enhanced efficiency spline-fitting paradigm.
reduceETrials(df, possibleVars, bsplBegDt, bsplEndDt, trap, all.ind.inside)
df |
The data frame for a specific |
possibleVars |
The set of all available variables for possible inclusion to the fitting of an enhanced efficiency model. Usually include efficiency-trial variables, environmental covariate variables, and CAMP-collected variables. |
bsplBegDt |
The first date, via the spline-1959-1960 paradigm, to which all efficiency years and dates collapse. |
bsplEndDt |
The last date, via the spline-1959-1960 paradigm, to which all efficiency years and dates collapse. |
trap |
A trap for which efficiency data are available. |
all.ind.inside |
A logical vector of length equal to the number of rows
of data frame |
Function reduceETrials
does the work of mapping several
years' worth of efficiency trials to one common temporal period. For
convenience, the common temporal period is 1960. 1960 was select because
it is a leap-year. It is also near the POSIX
temporal original date
of "1970-01-01"
. This is helpful in rare cases in which direct
manipulation of POSIX
items is necessary, since raw numerics
associated with POSIX
variables record the number of seconds since
the origination date.
Sometimes, the spline year paradigm for a river may stretch back into 1959.
It never stetches into 1961. This is important for use in function
eff_model
, where care must be taken to ensure that the resulting
1960-spline fit housed in previously fit enhanced efficiency data maps
correctly to provided min.date
and max.date
, when provided
for passage estimation. Lack of attention here could result in re-maps to
the wrong min.date
and max.date
year.
A list containing several items.
The original df
with batchDate2
appended.
The set of efficiency trials for the TrapPositionID
of interest.
The number of efficiency trials within the time period of interest.
The set of possible covariates available prior to model fitting.
An accounting data frame helpful in creating data frame betas
following model fitting.
A logical vector indicating which batchDates
fell within the temporal range spanned by valid efficiency trials.
## Not run: ans <- reduceETrials(df,possibleVars,bsplBegDt,bsplEndDt,trap,all.ind.inside) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.