[R] R and Excel

Erich Neuwirth erich.neuwirth at univie.ac.at
Thu Jan 8 19:26:35 CET 2009


There is RExcel (available by downloading the CRAN package
RExcelInstaller. It allows to transfer data between R and Excel,
and run R code from within Excel. So you can start with your data in
Excel, let R do an analysis, and transfer the results back to Excel.
You can write VBA macros which do this, but "hidden from exposure",
so the Excel user does not even notice that R is doing the hatd work.
It also has an Excel worksheet function RApply which allows
to call an R function from an Excel cell formula.
=RApply("rfun",A1)
would apply the R function rfun to the value in cell A1.
If the value in A1 changes, Excel will force R to recalculate the formula.

There is a (half hour long) video demo about RExcel
at http://rcom.univie.ac.at/RExcelDemo/

http://rcom.univie.ac.at/ has more information about the project.
For recent information, visit the Wiki on this site.

This site also has the alpha version of an OpenOffice add-in
giving roughly the same functionality.
It is available at
http://rcom.univie.ac.at/download/ROOo/


The main source of information about this project is
the mailing list. You can subscribe also via the project server,
http://rcom.univie.ac.at



ohri2007 at gmail.com wrote:
> Even using the VBA back of Excel to create interfaces with R would
> make a lot of sense. Suppose I could have access to VBA macros that
> import and export data into R , it would be great.
> 
> The R GUI series like Rattle come even closer to Excel...so a VBA
> _R_ExCel package might  be useful to ordinary folks .
> 
> Besides Excel costs money, so adding R functions to Open Office would
> help both of them ( if not attempted already)
> 
> Regards,
> 
> Ajay
> 
> www.decisionstats.com
> 
> On 1/8/09, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
>>> "Some people familiar with R describe it as a supercharged version of
>>> Microsoft's Excel spreadsheet software..."
>>>
>> It is easy to ridicule this line from the NYT article.  But this is not only
>> a very sensible comment by a smart reporter, but also one that is good for
>> R:
>>
>> It is good for R because it explains the new (R) in terms of the familiar
>> (Excel).  Of course R can do far more than Excel ever could, but most
>> readers will not be familiar with boxplots, let alone studentized bootstrap
>> confidence intervals, yet R is useful even for elementary analyses.
>>
>> It is good for R because it will bring us new users.  I have often looked
>> over the shoulders of Excel users struggling to do analyses or construct
>> graphics that are just slightly beyond what Excel makes easy. Perhaps the
>> dataset is too large, or the analysis doesn't fit into the spreadsheet
>> model, or the analysis isn't built-in (and so requires either many manual
>> steps, or Visual Basic programming, or an expensive add-on package), or it
>> requires data sources that Excel doesn't handle well, or it has gotten so
>> complicated that it is unmaintainable in spreadsheet form.  R scales better
>> in every way: in size of problem, in complexity of analysis, in data
>> sources.
>>
>> It is good for R because it makes it sound unthreatening and easy, both for
>> the person who might consider using R rather than Excel, and for his/her
>> management.  Of course, R is not trivial to learn, but you don't have to
>> master everything about it to get useful results (just like Excel, I might
>> add).
>>
>> It is good for R because it reminds us that there are other useful computing
>> paradigms that we can learn from. The spreadsheet model, including instant
>> update, is compelling for a wide range of problems.  I have not used any of
>> the R/Excel interface packages, but presumably they combine the advantages
>> of the approaches. Perhaps there is room for not just integrating R with
>> Excel, but for incorporating the core ideas of Excel into R in some
>> intelligent way.
>>
>> It is good for R because it shows areas where R can be improved.  Excel
>> makes it very easy to present tabular data and format it.  It makes it very
>> easy to work with summary/contingency tables (pivot tables) interactively
>> and only a little more difficult to do drill-down.  In all cases, its
>> functionality is limited, but what it can do, it does well.
>>
>> It is good for R because it reminds us that there are many people using
>> other tools who could benefit from outreach from the R community, both
>> through tools (smoother interoperability) and through education.
>>
>> All in all, characterizing R as a supercharged version of Excel makes a lot
>> of sense.
>>
>>          -s
>>
>> 	[[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.176 / Virus Database: 270.10.5/1882 - Release Date: 1/8/2009 8:13 AM
> 

-- 
Erich Neuwirth, University of Vienna
Faculty of Computer Science
Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39464 Fax: +43-1-4277-39459




More information about the R-help mailing list