[R] MySQL and RODBC - limitations

Duncan Murdoch murdoch at stats.uwo.ca
Tue Mar 30 19:43:15 CEST 2010


On 30/03/2010 1:35 PM, jorgusch wrote:
> I found the solution.
> The problem was indeed R. 
>
> Their is a simple way to solve the problem, but it just needs a bit more
> time. 
> If you download large integers from a database, convert it "on the fly" with
>
> SELECT CONVERT(yourcolumn,char)
>
> That is it. This is nor problem, as long you do NO comparisons within this
> columns. If you want to find something like entry10>entry11 ('13'>'2') than
> the result will be wrong, if both values do not have the same number of
> characters. Hence, if you have numbers, you must fill up the empty slotes
> with zeros. So it would look like:  '13'>'02'.
>   

If your longest integer is 10 digits (as mentioned earlier), you might 
do better to convert them to doubles rather than char.  I don't know how 
to say "double" in mySQL, but if you can figure that out, you should be 
good to about 15 digits.

Duncan Murdoch



More information about the R-help mailing list