0

Is there a version of the package RDCOMEvents that works in recent versions of R (2.14 or 2.15)?

I've been trying to get the example on the penultimate page of http://www.stat.berkeley.edu/~nolan/stat133/Fall05/lectures/DCOM.pdf to work - the one starting with the lines

library(RDCOMClient)
library(RDCOMEvents)

I can install RDCOMClient without a hitch, but not RDCOMEvents as it says that the package was built before R 2.10.0.

Any tips that can get me up and running very gratefully received... thanks :)

EDIT (16 July 2012):

Tried installing from the source as suggested, but no good (see below). Really disappointing that such an invaluable package seems to have been left to rot!

C:\mypackage>R CMD INSTALL RDCOMEvents_0.3-1.tar.gz
* installing to library 'C:/Users/timp/Documents/R/win-library/2.13'
* installing *source* package 'RDCOMEvents' ...
** libs
  running src/Makefile.win ...
c:/MinGW/bin/g++ -g -Id:/duncan/Projects/R/R-check/src/include -D_GNU_ -DNO_PYCO
M_IPROVIDECLASSINFO -DUSE_R -Wno-deprecated -I.   -c -o events.o events.cpp
events.cpp:12:18: fatal error: Defn.h: No such file or directory
compilation terminated.
make: *** [events.o] Error 1
ERROR: compilation failed for package 'RDCOMEvents'
* removing 'C:/Users/timp/Documents/R/win-library/2.13/RDCOMEvents'

EDIT 2 (16 July 2012):

RExcel has been suggested as an alternative approach - can anyone point me to an RExcel example where buttons/handlers in the sheet are generated from within R (as in the example quoted above), rather than the spreadsheet designer having to grapple with VBA code within the spreadsheet? Given that this R-centric approach was possible a few years ago, it must surely still be possible now... somehow...

Tim P
  • 1,383
  • 9
  • 19

2 Answers2

0

Well, you could try installing the packages from source code which is available for both packages here and here.

Once you've unpacked the archives you can build and install them using R from the command-line, e.g.

R CMD install RDCOMClient

or

R CMD install RDCOMEvents

Unfortunately the build fails on my system (OS X here) as the necessary Microsoft C compiler and libraries aren't available. I guess you'll have to install Visual Studio along with the rest before you can build and install these packages.

Hope it helps anyway!

fotNelton
  • 3,844
  • 2
  • 24
  • 35
0

The last update to RDCOMEvents is 2005. It hasn't been automatically compiled for newer versions of R because it would require the Visual Studio compiler, and is really only useful for the Windows operating system. (I tried compiling it with the ming compiler too, but there are directives in there that are dependent on Visual Studio.)

So, you could grab Visual Studio, and try to get it to compile. I don't envy that task.

However, you may not be aware of the RExcel package. They have also developed a package to get R to talk to Excel (and Word) through the DCOM stuff. It is free for single non-commercial use. I don't think the middleware is open source, but it works. Not an answer to your question, but perhaps good enough?

nograpes
  • 18,623
  • 1
  • 44
  • 67
  • I'm aware of RExcel - but can it provide the same functionality as the example quoted? Really looking for a way of setting up worksheet's buttons/handlers from R rather than having to wrangle with VBA macro code - and the example seemed to be showcasing a way to do that. Is there an equivalent example for RExcel? – Tim P Jul 16 '12 at 22:34