Hi All, I need your help in NA handling.
I've following data series. x<-c(1,4,5,8,NA,4,NA,5,5,1,2,7,8,9,NA,NA,NA,15,6,8) Now i want to interpolate where NA value persists. Like, between 9 and 5 there are three NA's. So, that should be interpolated like, 1st NA-> (15-9)/4 2nd NA-> 1st NA value + (15-9)/4 Can i get help on this using a 'for' loop. Actually i have huge daily time series with lots of NA values where i need to make these values. Please help. Thanks, Sumanta Basak. --------------------------------- [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html