[R] help with RMySQL

Seth Falcon sfalcon at fhcrc.org
Sun Feb 25 19:16:22 CET 2007


"Ravi S. Shankar" <ravis at ambaresearch.com> writes:

> Hi R users,
>
> I am using RMySQL to connect to a database in MySQL.
>
> I have 3 questions.
>
>  
>
> 1)When I give the following command
>
> dbListTables(con)
>
>  
>
> I get the output 
>
>  
>
> stack imbalance in .Call, 142 then 143
>
> stack imbalance in <-, 140 then 141
>
> stack imbalance in {, 138 then 139
>
> stack imbalance in standardGeneric, 126 then 127
>
> stack imbalance in class, 121 then 122
>
> stack imbalance in <-, 119 then 120
>
> stack imbalance in {, 117 then 118
>
> stack imbalance in <-, 111 then 112
>
> stack imbalance in {, 109 then 110
>
>  
>
> [1] "newtable" "ravi"    
>
>  
>
> Could somebody tell me why it shows a stack imbalance?

It most likely indicates a bug in the package's C code.  But you need
to tell us the output of sessionInfo() and the version of MySQLite you
are using.

You might also want to send such a message to the r-sig-db list.

>
>  
>
> 2)For this command
>
> testcmd1<-fetch(dbSendQuery(con,"select ticker from ravi where
> banks>=100"))   
>
>> dim(testcmd1)
>
> The output is
>
> [1] 500   1
>
> However when I give the same command directly in MySQL command prompt I
> get an output greater than 2000!! (Does fetch have a limitation?)

Read the doc for fetch.

> 3) Also is it possible to get output where the NA values are
>    removed?

Not sure what you mean, but you can always remove them afterwards.
nulls in the DB should get pulled across as NA and so if your query
excludes nulls...

+ seth



More information about the R-help mailing list