ts_interpolate: Interpolation of a time series with missing values

View source: R/timeseries.R

ts_interpolateR Documentation

Interpolation of a time series with missing values

Description

Interpolation of a time series with missing values

Usage

ts_interpolate(s, method = c("airline", "average"))

Arguments

s

The original time series

method

airline: interpolation through an estimated airline model average: interpolation using the average of the previous and next non missing values

Value

The interpolated series

Examples


ts_interpolate(AirPassengers)

x <- AirPassengers
x[50:60] <- NA
ts_interpolate(x)


rjd3toolkit documentation built on Jan. 14, 2026, 1:06 a.m.