Skip to content
Prev 309278 / 398506 Next

Problems plotting a sparse time series in R

Thanks to you two! :)

The zoo-manual explains the functions na.locf and na.approx, which deal 
with this problem. I have to admit I didn't read the whole thing before 
posting. But na.approx does exactly that - linear interpolation for all 
NA-points. Plots work fine after adding this line:

ts <- na.approx(ts)

Thanks again!
  -- Alex