Misunderstanding ...

rowse[1]> options(digits.secs=6)
Browse[1]> head(tempBs)
                        ..1   ..2 ..3 pnlSlice
2011-06-03 13:32:24.975 242 99125   1      -75
2011-06-03 13:32:55.036 242 99100  -1      -25
2011-06-03 13:36:10.490 242 98850  -1      -50
2011-06-03 13:36:59.064 242 98775   2       25
2011-06-03 13:38:21.795 242 98550  -2     -200
2011-06-03 13:40:01.725 242 98825   1     -450
Browse[1]>


that's not what I need. A bit of digging revealed:

Browse[1]> as.double(as.POSIXct("2011-06-03 13:32:24"))
[1] 1307100744
Browse[1]>

I would like to get the timestamp instead of a date string ...
some matrix where the first column contains the timestamp in milliseconds
since epoch start ...




On Sun, Jun 5, 2011 at 7:23 PM, Brian G. Peterson <brian@braverock.com>wrote:

> On Sun, 2011-06-05 at 18:41 +0200, Ulrich Staudinger wrote:
> > I have an xts/zoo object called tempBs, which has nicely assigned the
> > timestamps to each row (see below). How can I convert the row-label to
> > seconds or milliseconds since the epoch beginning (or any other
> > integer or double number)?
>
> How about just using the POSIXct mode?
>
> options(digits.secs=6)
>
> should do it.
>
> see
>
> ?POSIXct
>
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
>


-- 
Ulrich Staudinger
http://www.activequant.org

	[[alternative HTML version deleted]]

