Skip to content
Prev 366317 / 398502 Next

[FORGED] Export R output in Excel

Well, my few cents again.
the packages
openxslx and xlsx allow to write dataframes as Excel sheets.
(xlsx is Java based, so it has more requirements to run than openxlsx,
which is just C++ based)

On Windows, R tools for Visual Studio allows Excel export.
For Windows, there also is our Excel add-in RExcel allowing
to use R from within Excel, and the R package rcom
which also allows to interact with Excel from R (more than just writing Excel workbooks).
Our products (rcom and RExcel), however, are not unter a FOSS license.

And a more general remark: There are a lot of things where R is a much better choice than Excel,
but there are a few things where it really makes sense  to use spreadsheets.

Spreadsheets offer a totally different paradigm to work with data, or more generally,
numbers and formulas. 
One can interact with the data directly, not hide them behind variable names.
And, the interaction is haptic, gesture based, not expressed as a language.

Rearranging the layout of a pivot table by dragging variable ?blocks?
is very intuitive and something which R itself doe not offer
(in fact, I wrote an add-in for R Commander to implement it).

Of course, Excel is not a good chice for a polished reproducible workflow.
But I think quite a few people (including me), when starting a new project,
are not ready immediately to set up this ?perfect? workflow,
and it is much easier to experiment with the data with a spreadsheet based
interface.

For me, working with spreadsheets is more like improvising some Jazz,
and writing R code is like writing a score for a composition.