1

I have a time series data in R. The data are in the following format:

datetime value
2012-04-18 14:22:09   342.82
2012-04-18 14:22:11   345.14
2012-04-18 14:22:12   341.68
2012-04-18 14:22:15   342.21
2012-04-18 14:22:16   342.36

The data are collected with frequency of 1 second, but some values are missing (for example the values of 2012-04-18 14:22:10, 2012-04-18 14:22:13, 2012-04-18 14:22:14). I just want to get these data added to the series by interpolation. How can I do this in R?

I tried this:

y <- zoo(x, frequency=1);

but I didn't get what I wanted.

Thanks!

IRTFM
  • 258,963
  • 21
  • 364
  • 487
gabriel
  • 345
  • 1
  • 5
  • 16
  • 1
    See `na.approx` in the `zoo` package and [this SO answer](http://stackoverflow.com/questions/13073686/interpolating-timeseries). – eipi10 Apr 01 '15 at 22:15
  • There's nothing about resampling in this question. – IRTFM Apr 01 '15 at 23:55

0 Answers0