# na.interp

From forecast v8.10
by Rob Hyndman

##### Interpolate missing values in a time series

By default, uses linear interpolation for non-seasonal series. For seasonal series, a robust STL decomposition is first computed. Then a linear interpolation is applied to the seasonally adjusted data, and the seasonal component is added back.

- Keywords
- ts

##### Usage

```
na.interp(
x,
lambda = NULL,
linear = (frequency(x)
```

##### Arguments

- x
time series

- lambda
Box-Cox transformation parameter. If

`lambda="auto"`

, then a transformation is automatically selected using`BoxCox.lambda`

. The transformation is ignored if NULL. Otherwise, data transformed before model is estimated.- linear
Should a linear interpolation be used.

##### Details

A more general and flexible approach is available using `na.approx`

in
the `zoo`

package.

##### Value

Time series

##### See Also

##### Examples

```
# NOT RUN {
data(gold)
plot(na.interp(gold))
# }
```

*Documentation reproduced from package forecast, version 8.10, License: GPL-3*

### Community examples

Looks like there are no examples yet.