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

Patrick Hausmann
Thu, 23 Jun 2005 09:11:05 -0000

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