Re: [R] Interpolate xts

2011-01-11 Thread Joshua Ulrich
Use na.approx: set.seed(21) x <- xts(rnorm(10), Sys.time()-10:1) is.na(x) <- 2:4 is.na(x) <- 8:9 na.approx(x) na.spline(x) Best, -- Joshua Ulrich  |  FOSS Trading: www.fosstrading.com On Tue, Jan 11, 2011 at 12:08 AM, Rustamali Manesiya wrote: > Hello, > >       I have a xts object, I would l

[R] Interpolate xts

2011-01-10 Thread Rustamali Manesiya
Hello, I have a xts object, I would like to fill the NA with linear interpolated data. Can anyone please help. > str(zz) An ‘xts’ object from 2010-11-24 15:59:29 to 2010-11-24 16:00:00 containing: Data: num [1:23401, 1] 312 312 312 312 312 ... Indexed by objects of class: [POSIXct,POSI