Hi, I have a data frame that looks like this:

> print(tmp.2, row.names=F)
       Date        A       B        C        D
 2009-06-30 437.4941 1498.94 3013.123 7771.071
 2009-07-31 445.5752 1612.31 3182.020 7800.285
 2009-08-31 460.4486 1670.52 3230.984 7900.123
 2009-09-30 476.5982 1732.86 3438.276 7980.975
 2009-10-31 490.8214 1700.67 3205.386 7937.876
 2009-11-30 491.5338 1802.68 3329.164 8091.661
 2009-12-31 492.6630 1837.50 3257.927 7701.011
 2010-01-29 495.9595      NA       NA       NA
 2010-01-31 495.9595 1771.40 3280.050 7865.038
 2010-02-26 493.2970      NA       NA       NA
 2010-02-28 493.2970 1826.27 3373.147 7901.680
 2010-03-31 508.8930 1936.48 3236.337 7778.707
 2010-04-30 515.2000 1967.05 3356.522 7899.239
 2010-05-28 507.9438      NA       NA       NA
 2010-05-30       NA      NA 3446.907       NA
 2010-05-31 507.9438 1809.98       NA 8172.843
 2010-06-30 513.0341 1715.23 3454.708 8426.962
 2010-07-30 529.3736      NA       NA       NA
 2010-07-31       NA 1835.40 3568.250 8468.670
 2010-08-31 553.9723 1752.55       NA 8824.940
>

Can someone recommend a way to align all these series on the same date (last
day of month) - i.e for each series pick the value as of the last day of the
month if its non-NA, else use the previous value for the last day of the
month? I was planning to use timeSeries, but solutions that use zoo or xts
will be great as well.

I could build something myself but am hoping there is a robust solution
already available to solve a common problem like this.

Thanks much.

Thanks.

Cheers, Anil

	[[alternative HTML version deleted]]

