Skip to content
Prev 5132 / 15274 Next

Discretising intra-day data using zoo?

On Sun, Nov 8, 2009 at 7:58 AM, Ajay Shah <ajayshah at mayin.org> wrote:
The trick is that converting to ts makes the series regular (as that
is the only thing ts can represent) so just convert it to ts and then
back to zoo.  Since ts cannot represent POSIXct what you get back will
not have the POSIXct class= attribute set so just set it yourself.
spread    ltp
2009-02-16 05:00:05 0.0050 48.715
2009-02-16 05:00:10     NA     NA
2009-02-16 05:00:15 0.0025 48.715
2009-02-16 05:00:20 0.0025 48.715