[R] setting up dates

Erin Hodgess erinm.hodgess at gmail.com
Fri Jul 16 18:38:17 CEST 2010


I have several data sets, which begin early in 2002 and run until
yesterday.  They do not have observations every day.  For example:
> xd1[1:10]
2002-02-25 2002-02-26 2002-02-28 2002-03-01 2002-03-04 2002-03-05 2002-03-07
         7          8          1          9         12          3          5
2002-03-08 2002-03-11 2002-03-12
         7         10          5
>


I want to set up zoo series which has every day from 2002-01-01
through yesterday.  There should be zeros on the "non appearing" dates
and the previously seen values on the appearing dates.

I've tried union and merge, but they didn't seem to work correctly.

Thank you in advance,
Sincerely,
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