Learn R Programming

forecast (version 8.1)

na.interp: Interpolate missing values in a time series

Description

Uses linear interpolation for non-seasonal series and a periodic stl decomposition with seasonal series to replace missing values.

Usage

na.interp(x, lambda = NULL)

Arguments

x

time series

lambda

a numeric value suggesting Box-cox transformation

Value

Time series

Details

A more general and flexible approach is available using na.approx in the zoo package.

See Also

na.interp, tsoutliers

Examples

Run this code
# NOT RUN {
data(gold)
plot(na.interp(gold))

# }

Run the code above in your browser using DataLab