[R] double precision
Yoni Schamroth
yoni.schamroth at compile-inc.com
Tue Dec 5 22:03:37 CET 2006
Hi,
I am attempting to query a data frame from a mysql database.
One of the variables is a unique identification number ("numeric") 18 digits
long.
I am struggling to retrieve this variable exactly without any rounding.
The function I am using is sqlQuery(), with an ODBC connection.
Querying directly results in the double being rounded towards the end (eg
6527600583317876352 instead of 6527600583317876380)
Is there anyway of preserving the "numeric" class of the variable and it
precision without converting it to a factor? Is the double stored as a
64-bit integer?
I have attempted to use the 'dec' as well as 'as.is = TRUE', both
automatically convert it to a factor which I am trying to avoid.
Any advice or assistance would be greatly appreciated.
Thanks
Yoni Schamroth
Director of Research
MediaBoost LTD
Tel. +972-3-5333033 (ext. 105)
Fax. +972-3-5480617
Mob. +972-52-3422204
yoni.schamroth at compile-inc.com
More information about the R-help
mailing list