AIprep | R Documentation |
Read in the adult sea lamprey trapping data (collected for estimation of the Adult Index) and prepare it for estimation.
AIprep( csvDir, csvNew, csvOld = NULL, streamInfo = trappedStreams, indexStreams = lsIndex, keepStreams = lsKeep )
csvDir |
A character scalar identifying the path where the csv files are
stored, e.g., |
csvNew |
A character scalar identifying the name of the csv file
with stream mark-recapture estimates for which Adult Indices
will be estimated (typically from the current year). The first row of
the csv file should be column headers and must include: |
csvOld |
A character scalar identifying the name of the csv file
with stream mark-recapture estimates for which Adult Indices
have already been estimated (typically from previous years),
with the same variables as in |
streamInfo |
A data frame with stream information to be combined with the estimates
data (csvNew and csvOld), default |
indexStreams |
Lake-stream IDs identifying index streams, default lsIndex. |
keepStreams |
Lake-stream IDs identifying streams which will continue to have ongoing trapping even if not part of the Adult Index, default lsKeep. |
Lake-stream IDs are combination of lake ID and stream ID e.g., 1.064 = lake ID + (stream ID)/1000.
For both estimate files (csvNew and csvOld), there should be no missing
values in year
, lake
, or lscode
.
Both files may contain variables other than those required.
Those with the same name as variables in streamInfo
will be
replaced. Others will be kept.
A single data frame that contains the information from all of the inputs,
including new variables: index
, a logical
identifying the index streams; maintain
a logical identifying the
streams that will continue to have ongoing trapping even if not part of
the Adult Index; indexContrib
a numeric, the stream population
estimate that will be used in the Adult Index (NA for csvNew);
indexContribCV
a numeric, the stream CV that will be used to
generate 95% confidence intervals for the Adult Index (NA for new); and
complete
a logical identifying streams and years for which the
Adult Index has already been estimated (FALSE for csvNew).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.