> Hi,
> 
> I have a two Colum matrix ( I named it holder) as shown bellow. It
> seems to be three columns, but the first column contains the row
> names.
> 
> I am trying to fill all  NAs by linear interpolation the known values
> in the matrix. I tried using the interpNA function, but I get an error
> message:
> 
> > interpNA(holder, method = "linear")
> Error in approx(idx, x[idx], 1:n, method = method, f = f) : 
>   need at least two non-NA values to interpolate
> In addition: Warning message:
> In xy.coords(x, y) : NAs introduced by coercion
> > 
> 
> 
> I was wondering if some one could recommend another function to get
> the interpolated values?
> 
> Thanks,
> 
> Jorge
> 
> 20100319 2010-03-19  1626
> 20100320 2010-03-20    NA
> 20100321 2010-03-21    NA
> 20100322 2010-03-22    NA
> 20100323 2010-03-23    NA
> 20100324 2010-03-24    NA
> 20100325 2010-03-25    NA
> 20100326 2010-03-26  1638
> 20100327 2010-03-27    NA
> 20100328 2010-03-28    NA
> 20100329 2010-03-29    NA
> 20100330 2010-03-30    NA
> 20100331 2010-03-31    NA
> 20100401 2010-04-01    NA
> 20100402 2010-04-02  1669
> 20100403 2010-04-03    NA
> 20100404 2010-04-04    NA
> 20100405 2010-04-05    NA
> 20100406 2010-04-06    NA
> 20100407 2010-04-07    NA
> 20100408 2010-04-08    NA
> 20100409 2010-04-09  1756
> 20100410 2010-04-10    NA
> 20100411 2010-04-11    NA
> 20100412 2010-04-12    NA
> 20100413 2010-04-13    NA
> 20100414 2010-04-14    NA
> 20100415 2010-04-15    NA
> 20100416 2010-04-16  1829
> 20100417 2010-04-17    NA
> 20100418 2010-04-18    NA
> 20100419 2010-04-19    NA
> 20100420 2010-04-20    NA
> 20100421 2010-04-21    NA
> 20100422 2010-04-22    NA
> 20100423 2010-04-23  1912
> 20100424 2010-04-24    NA
> 20100425 2010-04-25    NA
> 20100426 2010-04-26    NA
> 20100427 2010-04-27    NA
> 20100428 2010-04-28    NA
> 20100429 2010-04-29    NA
> 20100430 2010-04-30  1995
> 
> 

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to