[R-SIG-Finance] Dates manipulation
manojsw at gmail.com
Mon Apr 27 15:34:22 CEST 2009
I am using version 2,8,1 and working with zoo library.
The sample/dummy data-set i am working off takes the following structure:
Date Ticker Price
2009-04-21 X 2.32
2009-04-22 X 2.35
2009-04-23 X 2.34
2009-04-21 Y 10.2
2009-04-22 Y 10.32
2009-04-23 Y 10.15
The data-frame consist of Date as a Date object, Ticker and Price.
Price can be uniquely identified by Date & Ticker.
One of the issues with creating a zoo object with above data-set is
the fact that the unique key is basically a composite key so it's not
purely time-series data but does take the format of panel data.
I want to be able to perform normal data function (lag,time etc) on
the above data-set for example, lag would return all the rows except
for ticker X&Y for 2009-04-23.
Is there anyway, i can sub-class zoo object to achieve this functionality?
Any suggestions would be greatly appreciated - thanks in advance.
More information about the R-SIG-Finance