[R-SIG-Finance] millisec timestamps for rows of xts/zoo object

Dirk Eddelbuettel edd at debian.org
Sun Jun 5 20:33:37 CEST 2011

On 5 June 2011 at 20:14, Ulrich Staudinger wrote:
| Hi Dirk,
| but I don't have a POSIXct object, I have an xts time series object and want

Are you sure?  What does 

    class( index ( tempBs ) )

return?  And are you sure that time index for xts cannot be casted into POSIXct?

| the timestamps as seconds/milliseconds with the goal to save it to a database
| ...

Yes. POSIXct is 'just' a double with millseconds resolution which can be
passed down to C/C++, stored in a DB, etc pp with ease just because it can
reduce to a double (if you are willing to forego attributes such as local
timezones etc).


Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com

More information about the R-SIG-Finance mailing list