Re: [R] Linear Interpolation question

2010-07-29 Thread Gabor Grothendieck
On Thu, Jul 29, 2010 at 5:16 PM, Ralf B wrote: > Hi R experts, > > I have the following timeseries data: > > #example data structure > a <- c(NA,1,NA,5,NA,NA,NA,10,NA,NA) > c <- c(1:10) > df <- data.frame(timestamp=a, sequence=c) > print(df) > > where i would like to linearly interpolate between t

[R] Linear Interpolation question

2010-07-29 Thread Ralf B
Hi R experts, I have the following timeseries data: #example data structure a <- c(NA,1,NA,5,NA,NA,NA,10,NA,NA) c <- c(1:10) df <- data.frame(timestamp=a, sequence=c) print(df) where i would like to linearly interpolate between the points 1,5, and 10 in 'timestamp'. Original timestamps should no