stepper: stepper

View source: R/stepper.r

stepperR Documentation

stepper

Description

For a set of covariates for which estimates have been obtained on non-continguous dates, expand recorded data values to fill in all dates, so as to create a step-like function.

Usage

stepper(df, varVec, min.date, max.date)

Arguments

df

A data frame containing variables recorded via non-continguous batchDates. Argument df should include "batchDate" and "TrapPositionID" in addition to the variables for which step-expansion is required.

varVec

A string vector containing the names of variables for which step-expansion is required. Typically set to c("bdMeanNightProp","bdMeanMoonProp","bdMeanForkLength") for most CAMP applications.

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.

Details

The stepper function is usually only called within eff_model when applying previously obtained enhanced efficiency model results.

Value

A dataframe with one row for all unique batchDates included within min.date and max.date, inclusive. All variables, as provided via varVec, have a non-NA value.

Author(s)

WEST Inc.

See Also

eff_model

Examples

## Not run: 
df <- stepper(df=df,
              varVec=c("bdMeanNightProp","bdMeanMoonProp","bdMeanForkLength"),
              min.date=min.date,
              max.date=max.date)

## End(Not run)

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