Dear Group,
if anyone has experience with the RMySQL Package maybe this behaviour is know:
Reading data from a table into R the fields with datatype bigint(20) unsigned
are transformed in some way: e.g. the query "select * from orders where
userid = 14929859848712890325" selects the correct case but in R the userid
is changed to 14929859848712890368. What happened here? This transformation is
true for all fields of that type...
Thank You for any help
Dubravko Dolic
Statistical Analyst
Tel: +49 (0)89-55 27 44 - 4630
Fax: +49 (0)89-55 27 44 - 2463
Email: dubravko.dolic@komdat.com
Komdat GmbH
Nymphenburger Straße 86
80636 München
---------------------------------------------
ONLINE MARKETING THAT WORKS
---------------------------------------------
This electronic message contains information from Komdat Gmb...{{dropped}}
On 7/4/2005 9:50 AM, Dubravko Dolic wrote:> Dear Group, > > > > if anyone has experience with the RMySQL Package maybe this behaviour is know: > > > > Reading data from a table into R the fields with datatype bigint(20) unsigned are transformed in some way: e.g. the query "select * from orders where userid = 14929859848712890325" selects the correct case but in R the userid is changed to 14929859848712890368. What happened here? This transformation is true for all fields of that type...R doesn't have a bigint type, so I imagine these are being changed to doubles. In double precision those are the same number. I don't know the best way to handle this, but one way would be to do SQL calculations to extract the lower 10 digits separately from the upper 10 digits. R doubles can represent 10 digit integers exactly. Duncan Murdoch