Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading data from Excel file into R or Octave

I have an Excel file with a large set of data. The built-in graphs available in Excel are not enough to analyze these data, so I am thinking about using some tool like octave or R.

I was thinking about some method to load an Excel file directly into octave or R. I searched the web and found that many people have succeeded using by exporting data from Excel into a CSV file.

The question: Is there a direct way to load an Excel file in R or Octave?

like image 720
Alphaneo Avatar asked Jul 29 '09 00:07

Alphaneo


1 Answers

Yes, here's how:

Windows users can use odbcConnectExcel in package RODBC. This can select rows and columns from any of the sheets in an Excel spreadsheet file (at least from Excel 97–2003, depending on your ODBC drivers: by calling odbcConnect directly versions back to Excel 3.0 can be read). The version odbcConnectExcel2007 will read the Excel 2007 formats as well as earlier ones (provided the drivers are installed: see RODBC).

like image 185
duffymo Avatar answered Sep 28 '22 05:09

duffymo