Re: [R] Converting IEEE Float in 16 char hex back to float

2010-03-01 Thread Roger DeAngelis(xlr82sas)
Hi, DSREAD utility solves the 200 byte, 8 char name and potential precision errors with other methods of transfering SAS datasets to perl and R. Importing SAS datasets(sas7bdat) into R (32 bit windows 2000, 32 bit SAS 9.2 and 32 bit R version 2.9.0 (2009-04-17) Here is what I want to

Re: [R] Converting IEEE Float in 16 char hex back to float

2010-02-27 Thread xlr82sas
Thanks Nice code. I appreciate the function. I don't know if you ever use SAS datasets but I am working with the devloper of 'dsread' to create a lossless transfer from SAS to R. I am also working on an in memory Java interface which would allow me to mix SAS and R code. Here is the link to dsr

Re: [R] Converting IEEE Float in 16 char hex back to float

2010-02-27 Thread Duncan Murdoch
On 27/02/2010 12:43 AM, xlr82sas wrote: Hi, If I do the following sprintf("%A",pi) "0X1.921FB54442D18" I have this 16 byte character string hx<-"400921FB54442D18" This is the exact hex16 representation of PI in IEEE float that R uses in Intel 32bit(little endian) Windows SAS uses the same re

[R] Converting IEEE Float in 16 char hex back to float

2010-02-26 Thread xlr82sas
Hi, If I do the following sprintf("%A",pi) "0X1.921FB54442D18" I have this 16 byte character string hx<-"400921FB54442D18" This is the exact hex16 representation of PI in IEEE float that R uses in Intel 32bit(little endian) Windows SAS uses the same representation. 11 bit exponent and 53 bit