| From | Sent On | Attachments |
|---|---|---|
| Keith Sabol | Nov 16, 2005 9:56 am | |
| Earl F. Glynn | Nov 17, 2005 2:28 pm |
| Subject: | [R] RODBC help | |
|---|---|---|
| From: | Earl F. Glynn (ef...@stowers-institute.org) | |
| Date: | Nov 17, 2005 2:28:24 pm | |
| List: | org.r-project.r-help | |
I had a similar problem when I posted this recently:
RODBC and Excel: Wrong Data Type Assumed on Import http://tolstoy.newcastle.edu.au/~rking/R/help/05/11/14938.html
My conclusion was: "Being lucky" shouldn't be part of processing Excel files, which is the case when RODBC is used.
This reply gave some suggestions: http://tolstoy.newcastle.edu.au/~rking/R/help/05/11/14990.html
I found this suggestion the most useful:
"You could try using the COM interface rather than the ODBC interface" http://tolstoy.newcastle.edu.au/~rking/R/help/05/11/15030.html
This approach has problems if you have "holes" in your data, but with some work I found RDCOMClient the way to go: http://tolstoy.newcastle.edu.au/~rking/R/help/05/11/15090.html
IMHO, RODBC should only be used if you have an Excel file without holes, and with very regular numeric data. I don't understand why the online documentation is not updated to give a usage note that RODBC will often fail reading Excel files.
Specifically,
this help:
library(RODBC) ?odbcConnectExce
should be modified to have a warning "RODBC considered harmful with Excel files"
efg
"Keith Sabol" <sabolk at hotmail.com> wrote in message news:BAY114-F12CBDEDD885260F9BE1AA7D75C0 at phx.gbl...
I am using the RODBC package to read data from an Excel file. ... My problem appears to be related to specification of data types by column.





