interp_range: Interpolate missing values with fixed ranges around discrete...

Description Usage Arguments Value Examples

View source: R/interp_range.R

Description

Interpolate missing values with fixed ranges around discrete samples

Usage

1
interp_range(x, y, max_interval, fill = 0)

Arguments

x

a vector of timesteps (numeric or date-like)

y

a vector of discrete values with NAs indicating missing values

max_interval

the maximum number of timesteps for using linear interpolation

fill

value to fill beginning and ending values outside max_interval

Value

vector of interpolated values corresponding to x

Examples

1
interp_range(x=seq(1,13), y=c(NA, NA, 1, NA, NA, 2, NA, NA, NA, 3, NA, NA, NA), max_interval=2, fill=0)

walkerjeffd/fluxr documentation built on Sept. 16, 2021, 1:29 a.m.