[R-SIG-Finance] Timestamped hex type conversions

Jeffrey Ryan jeff.a.ryan at gmail.com
Mon Jun 11 20:53:14 CEST 2012


You'll need more information.  Are the timestamps originally doubles?
int64? Endianess?

Your problem isn't xts per se, it is reading in binary and/or hex chars
(really chars???) into R.  xts uses R's native numerical representations,
double() or integer().  It also supports most of the rest, but that is
even more off topic than this.

?readBin

Reproducible example is recommended, and non-html (i.e. Text) is preferred.

Best,
Jeff

On 6/11/12 11:45 AM, "v mande" <man_9753 at yahoo.com> wrote:

>I have 8 8-bit bytes (16 HEX characters) followed by 4 8-bit bytes (8 HEX
>characters)  that I want to convert to an xts data frame.  Not being an
>expert at type conversions, I was wondering if anyone can help me out or
>point me in the right direction.
>Thanks 
>
>Victor
>
>
>Below is the data from AAPL - The first 8 are a millisecond timestamp
>since January 1, 1970 (00 00 01 37 ca 3f ae 00)
>the next 4 are the closing price (44 11 14 7b).
>
>00 00 01 37 ca 3f ae 00 44 11 14 7b
>00 00 01 37 c5 19 52 00 44 0e ee 14
>	[[alternative HTML version deleted]]
>
>_______________________________________________
>R-SIG-Finance at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>-- Subscriber-posting only. If you want to post, subscribe first.
>-- Also note that this is not the r-help list where general R questions
>should go.



More information about the R-SIG-Finance mailing list