[Rd] na.omit error message

Gabor Grothendieck ggrothendieck at myway.com
Sat Mar 26 03:53:18 CET 2005


If I create a bivariate ts series with 3 time points and run
na.omit on it expecting it to reduce it to a one point ts series
instead I get the following error messasge:


R> hh <- ts(matrix(c(NA,1:4,NA),3), start = c(1951,8), freq=12)
R> hh
         Series 1 Series 2
Aug 1951       NA        3
Sep 1951        1        4
Oct 1951        2       NA
R> na.omit(hh)
Error in "tsp<-"(`*tmp*`, value = c(1951.66666666667, 1951.66666666667,  : 
        invalid time series parameters specified
 

If I replace na.omit with na.contiguous then I get a protection stack
overflow:

R> na.contiguous(hh)
Error: protect(): protection stack overflow


R> R.version.string # Windows XP
[1] "R version 2.1.0, 2005-03-23"


Any comments on what is wrong?



More information about the R-devel mailing list