tags:

views:

168

answers:

3

Also, would it be illadvised to use RExcel for corporate work? Also, what are some advantages / disadvantages of using it? How small do files need to be for Rexcel?

+9  A: 

I have used it in the past, but am not currently using it. Here's my personal list of pros/cons:

pro:

  • easy access to R functions from Excel
  • allows slipping some R logic into an existing Excel spreadsheet
  • fairly easy to use syntax

con:

  • In some instances it can be slow. If you have 5000 calls to R in a spreadsheet you can eat lunch while it refreshes
  • to share a spreadsheet with RExcel embedded, the other users must have RExcel installed
  • Sometimes the connection to R drops and you have to reconnect it

In my opinion RExcel can be a useful hack, but I would not make it a critical path along my workflow. If you really need one or two functions from R then RExcel can be a lifesaver.

I used RExcel to greatly speed up a very slow Excel spreadsheet by replacing a slow VBA function with a very fast one from R. This just bought me time so I could migrate the whole process to R which made it much easier to maintain and track.

I'm not sure what you're asking when you asked "How small do files need to be for Rexcel?" RExcel is an Excel add-on, so if your data fits in Excel you can operate on it. Obviously if you get a huge Excel file in memory and try to send huge amounts of data to R which is also in memory you can run out of memory. But that's a function of accessible memory, not really RExcel.

JD Long
+3  A: 

Putting my card on the table: I am the author of RExcel. 5000 calls (say, using RApply) is not really what RExcel is meant for. But if these are all calls to the same function, one could probably vectorize the call and use array formulas in Excel. That would speed up calculation quite a bit.

Erich Neuwirth
Very good point.
JD Long
+2  A: 

There are two big problems with using (naked) Excel.

Firstly, it isn't terribly good at maths. By outsourcing this task to R via RExcel, you sidestep this problem.

Secondly, as with all spreadsheets, you don't get a clear separation of data and analysis-of-data, since cells can contain values or formulae. This makes it difficult to debug problems, and difficult to maintain complex analyses. Using RExcel will not help you with this.

The canonical reference for spreadsheet problems, if you fancy some further reading, is Spreadsheet Addiction.

Richie Cotton