[R]  possible problem with "endpoints"?
    Erin Hodgess 
    erinm.hodgess at gmail.com
       
    Thu Mar 17 07:27:54 CET 2011
    
    
  
Dear R People:
Hello again!
I found something unusual in the behavior of the "endpoints" function
from the xts package:
> x1 <- ts(1:24,start=2008,freq=12)
> dat <- seq(as.Date("2008/01/01"),length=24,by="months")
> library(zoo);library(xts)
> x2 <- zoo(1:24,order=dat)
> #Here is the surprise:
> endpoints(as.xts(x1),'quarters')
 [1]  0  1  4  7 10 13 16 19 22 24
> endpoints(as.xts(x2),'quarters')
[1]  0  3  6  9 12 15 18 21 24
Shouldn't the endpoints be the same, please?  What am I doing wrong, please?
Thanks,
Erin
-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com
    
    
More information about the R-help
mailing list