InterpSeries: Interpolate a low-resolution data series onto high-resolution...

Description Usage Arguments Details Value

Description

A low-resolution data series in dataframe df is linearly interpolated onto a high-resolution series. This hi-res series may be time or any other monotonic series. Linear interpolation is used and extrapolation at either end is given as a constant value, ie approxfun with rule=2 is used.

Usage

1
InterpSeries(df, cols, series_col = "date")

Arguments

df

Dataframe containing both series_col and cols columns

cols

Column name or number or vector thereof for column/s to interpolate

series_col

Column name or number of series of points to interpolate cols on to

Details

If the number of interpolation points is 0, df is returned unmodified with a warning. If the number of interpolation points is 1, df is returned with additional column/s filled with a constant value. A warning is also printed.

Value

df with additional columns with interpolated data. If cols is given as names then additional columns are named col_interp where col is in cols. If cols is a column number then new columns are added to the end of df.


freyasquires/noxpro documentation built on May 23, 2019, 7:33 a.m.