[R] RODBC help

Earl F. Glynn efg at stowers-institute.org
Thu Nov 17 23:28:46 CET 2005


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.




More information about the R-help mailing list