Re: [R] RODBC vs gdata

2012-01-09 Thread Gabor Grothendieck
On Mon, Jan 9, 2012 at 1:02 PM, Christof Kluß wrote: > Hi > > one col in my Excel file contains many numbers. But on line 3000 and > some other lines are strings like "FG 1". "RODBS" seems to omit this > lines. "gdata" works, but is much slower. > > Is this a bug of RODBC or do I apply it wrong? >

Re: [R] RODBC vs gdata

2012-01-09 Thread Ajay Askoolum
t;Feb" attr(,"class") [1] "rcomdata" > PS: If you want to use ADO, it is worthwhile getting to knpw all the methods applicable to the ResordSet object; it is very flexible. ____________ From: Enrico Schumann To: Christof Kluß Cc: r-h...@stat.math.e

Re: [R] RODBC vs gdata

2012-01-09 Thread Enrico Schumann
You could prepare the data in Excel as text, and then coerce them to numeric in R (and approriately code your "FG 1" strings). Depending on how large your file is, you could create a new file, format the cells as text, and then copy the data into this new file. Or change cell entries to text

Re: [R] RODBC vs gdata

2012-01-09 Thread Hasan Diwan
On 9 January 2012 10:46, Christof Kluß wrote: > thank you very much, so it is a known problem with the Microsoft Excel > ODBC drivers :( As I was advised a few weeks ago, the best way for Excel to get into R is to export the file as CSV and use read.csv, read.csv2, or read.table. Perhaps this is

Re: [R] RODBC vs gdata

2012-01-09 Thread Christof Kluß
Hi Enrico, thank you very much, so it is a known problem with the Microsoft Excel ODBC drivers :( "7 Excel Drivers ... There are at least two known problems with reading columns that do not have a format set before data entry, and so start with format `General'. First, the driver uses the fi rst

Re: [R] RODBC vs gdata

2012-01-09 Thread Enrico Schumann
Hi Christof, have a look at the manual of RODBC, and in particular the section on Excel drivers. RShowDoc("RODBC", package="RODBC") Regards, Enrico Am 09.01.2012 19:02, schrieb Christof Kluß: Hi one col in my Excel file contains many numbers. But on line 3000 and some other lines are str

[R] RODBC vs gdata

2012-01-09 Thread Christof Kluß
Hi one col in my Excel file contains many numbers. But on line 3000 and some other lines are strings like "FG 1". "RODBS" seems to omit this lines. "gdata" works, but is much slower. Is this a bug of RODBC or do I apply it wrong? Example with the same "file.xlsx" library(RODBC); excel <- odbcC