Re: [R] How to read an excel data into R?

From: roger bos <roger.bos_at_gmail.com>
Date: Thu 23 Jun 2005 - 22:29:40 EST

This is really great. I use odbc for sql all the time, but I never needed to read in excel files before. I needed to yesterday and I looked at read.xls() from library(gdata) and it took 5-10 minutes to read in the file and odbc did it in 5 seconds!

I guess that is the good thing about having duplication in function in R, we can try several methods and choose which one is best/fastest. Thanks for the example.

On 6/23/05, Patrick Hausmann <c18g@zfn.uni-bremen.de> wrote:
> Hi,
>
> you can use the library "RODBC" to import Excel-Files. This works for me:
>
> #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> library(RODBC)
> setwd("C:\\R1B2")
> channel <- odbcConnectExcel("pk2003.xls")
> tab <- sqlFetch(channel, "Tabelle3")
> #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> HTH
> Patrick
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 23 22:32:53 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:58 EST