The RDCOMClient package (version 0.93-0)

This package provides dynamic (i.e. non-compiled) access to COM objects from within R. It allows R to act as a COM client and invoke methods and access properties in any COM object that implements the IDispatch interface. This allows us to access and control applications such as Excel, Word, Power Point, Web browsers, etc.

Thomas Baier has a similar facility via the rcom package.

Using the SWinTypeLibs package, We can create a version that works from IDL or Type libraries and creates a "compiled" or non-dynamic interface to a particular COM class.

The RDCOMServer package provides a way to create COM server objects entirely within R. This is different to the existing RCOM server which exports fixed and specific functions for controlling R itself and exposes the interpreter and S language.

The combination of the RDCOMServer and RDCOMClient packages is essential to be able to handle arbitrary objects in COM calls. We need to be able to pass arbitrary R objects as arguments to COM methods. To do this, we need to create regular COM objects from these R objects. The RDCOMServer does this and completes the model.

Download

We provide both a source version and a binary version of the package.

Installation of the binary should be as straightforward as any other R package for Windows, e.g. use the command

install.packages("RDCOMClient", repos = "http://www.omegahat.org/R")
or use the Packages menu and make certain to include the Omegahat repository in the list of repositories to search.

To build the package from source, we can now use the usual R CMD INSTALL RDCOMClient command now that these R utilities work on Windows.

A brief history of the recent changes to the package are available in the Changes file.

Documentation

There are some early attempts to document the package. More to come!
  • Introduction
    A reasonably long and thorough discussion of using RDCOMClient and RDCOMEvents to put form elements (ActiveX components) on an Excel worksheet and respond to the events in R. This provides a reasonably good introduction to RDCOMClient, Excel and RDCOMEvents.
  • Todo list
    List of (some of the) things yet to be done related to this packge!
  • Examples

    A list of example R scripts registering functions and spreadsheets that use this is available.
    Duncan Temple Lang <duncan@wald.ucdavis.edu>
    Last modified: 03/02/12 07:30