Hi all.
I'm trying to see how the package Rodbc works, with R 1.2.2, win98 and MySql
3.23.
I'd like to export a dataset with 524 variables and 3440 records form R to
MySql. I issued the following commands:
library(RODBC)
channel <- odbcConnect("test")
sqlSave(channel,dat=totale)
Error in sqlTables(channel)[, 3] : incorrect number of dimensions
Actually it gave me other error messages, in previous trials *with the same
commands*.
Once it said something like ... vector maximum memory size reached...
Another time something like ...sqlColumns(...??) c(30,2,30...) should be a
vector names
^^^^^^^^^^^^^
(these are the values
in the first variable)
To reduce the load I created a 1x524 dataframe (to create the table structure
and then importing tha data directly from file.csv to MySql), but still I got
the same error
Where do I go wrong and why it gives different error messages with the same
command?
Thank you,
Stefano
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 12 Mar 2001, Stefano wrote:> Hi all. > > I'm trying to see how the package Rodbc works, with R 1.2.2, win98 and MySql 3.23. > I'd like to export a dataset with 524 variables and 3440 records form R to MySql. I issued the following commands: > > library(RODBC) > channel <- odbcConnect("test") > sqlSave(channel,dat=totale) > > Error in sqlTables(channel)[, 3] : incorrect number of dimensions > > Actually it gave me other error messages, in previous trials *with the same commands*. > Once it said something like ... vector maximum memory size reached... > Another time something like ...sqlColumns(...??) c(30,2,30...) should be a vector names > ^^^^^^^^^^^^^ > (these are the values in the first variable) > > To reduce the load I created a 1x524 dataframe (to create the table structure and then importing tha data directly from file.csv to MySql), but still I got the same error > > Where do I go wrong and why it gives different error messages with the same command?I think you have a line length problem somewhere in the interfaces. There is another option to sqlSave (fast=FALSE from memory) that you could try, but why do you want 524 columns in a single table? You could export them in parts and merge them in the DBMS, -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I think you have a line length problem somewhere in the interfaces.>There is another option to sqlSave (fast=FALSE from memory) that you could >try, but why do you want 524 columns in a single table? You could >export them in parts and merge them in the DBMS,The first option doesn't work. So I tried splitting the dataframe in 3440x100. Ok the first four. The last one ( dat5 <- totale[,401:524] ) gives me: Error in sqlColumns(channel, tablename) : dat5 :table not found on channel 0 Uhm, strange behaviour isn't it? Stefano *********************************************** Stefano Calza Istituto di Statistica Medica e Biometria Universit? degli Studi di Milano Via G. Venezian, 1 20133 Milano tel. +39 02/2361302, 02/70600908 fax 02/2362930 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._