[R] Re ad From EXCEL

Tom Backer Johnsen backer at psych.uib.no
Mon Apr 21 11:11:14 CEST 2008


ermimi wrote:
> Hello!!!
> 
> I have been read a much about as read data from Excel File, but I haven´t
> found the necesary information to read the data.
> Now, I can create a channel :  channel <- odbcConnectExcel("file.xls") but I
> don´t know as read the data??
> 
> I hope that you could help me. Thank you very much.

You are making an attempt at the most complex way of doing this.  The
simplest by far is (a) to read the data from the clipboard with the
read.table () function, or (b) save the spreadsheet as a .csv type file
and use the same function to read the file with the appropriate
arguments for separators etc..  I tend to use the latter approach.

In any case, once imported to R, the frame should be carefully checked
against the contents of the spreadsheet.

Tom



More information about the R-help mailing list