[R] importing excel-file
erich.neuwirth at univie.ac.at
Fri Apr 20 15:47:47 CEST 2007
I am coming in late in this discussion because I am away from home and
do not read my email regularly. Here are my few cents.
If you are working on Windows and have Excel installed,
an easy way of transferring data between R and Excel is my RExcel
package which ships with Thomas Baier's R(D)COM package, and also can be
used with Thomas' rcom package.
rcom is available as a package from CRAN and can be installed from the
package menu in RGui.
R(D)COM is available from CRAN in section Other. You have to download it
and run the installer program (and you need admin rights to be able to
If you use rcom, you should have R and Excel open simultaneously.
Then, just select a range in Excel, right-click any cell in the range,
and click on "Put Dataframe" in the context menu that pops up.
Your data are immediately transferred to R as a dataframe (you choose
that name, or RExcel uses the Excel file name or the worksheet name).
The main difference between the R(D)COM server and the rcom package is
that with rcom RGui is visible, so you can switch between R and Excel.
With R(D)COM, you have R in the background.
There is a mailing list, for all rcom and R(D)COM related questions,
you can subscribe by way of the rcom web server,
http://rcom.univie.ac.at (the link to the mailing list is there).
Schmitt, Corinna wrote:
> Dear R-experts,
> It is a quite stupid question but please help me. I am very confuced. I
> am able to import normal txt ant mat-files to R but unable to import
> I do not understand the online help. Can please anyone send me the
> corresponding command lines? The .xls-file is attached. In my file we
> use commas for the decimal format (example: 0,712), changes might be
> Thanks, Corinna
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Erich Neuwirth, Didactic Center for Computer Science
University of Vienna
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39464 Fax: +43-1-4277-9394
More information about the R-help