reMap: reMap

View source: R/reMap.R

reMapR Documentation

reMap

Description

Map 1959-1960 efficiency-trial batchDates back to the present, as defined via min.date and max.date.

Usage

reMap(df, bd, min.date, max.date, strt.dt, end.dt)

Arguments

df

Usually a c0 dataframe housing the basis matrix used to fit an underlying enhanced efficiency model. Thus, rows are unique (batchDate2 in the 1959-1960 paradigm), while columns are dimensions associated with the underlying b-spline matrix.

bd

A character vector of length one identifying the name of the variable holding batchDate2 to be mapped back (remapped) to the present.

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.

strt.dt

The remapped start date associated with the current trap's minimum (earliest) spline date.

end.dt

The remapped end date associated with the current trap's maximum (latest) spline date.

Value

A list with two dataframes. The first, c0 contains the remapped batchDates (so originating batchDate2, remapped to batchDate), for the originaing b-spline basis matrix, while the second, allDates also contains remapped batchDates for all days of interest.

Dataframe allDates is used as the originating left-table dataframe against which all other covariate dataframes are merged.

Author(s)

WEST Inc.

Examples

## Not run: 
reMap(df,bd,min.date,max.date,strt.dt,end.dt)

## End(Not run)

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