[Rd] Integrating R in OpenOffice

Harry Mangalam hjm at tacgi.com
Wed Jul 16 13:01:01 MEST 2003

Hi All,

A group of about 3-4 of us are looking into the possibility of incorporating R 
into OpenOffice's (OO) spreadsheet component (sc) .  We wish to use OO's nice 
ODBC ability to query a postgresql-based gene expression database thus 
populating an OO sc and then use Bioconductor via R to analyse user-selected 
parts of this spreadsheet.

We've looked at and compiled and used RGnumeric (with Duncan's help) to see 
what's possible under Gnumeric, but AFAIK gnumeric won't have DB connectivity 
for some time and has neither the finish nor the integration of OO.

We've reviewed quite a few documents that describe the integration approach and 
while it seems to be a bit complex (mostly due to UNO - OO's CORBA-like 
integration strategy), it seems to be quite doable.

We envision it working ike this:

- build R as a shared lib - libR.so [trivial - the R team has done this for us]

- use the UNO framework to direct the writing of an IDL that allows libR.so to 
be linked into the OO sc runtime [time consuming to digest all the docs and get 
a feel for how to do this, altho there are some introductory docs at: 

- write code that will automate the insertion of available R functions into the 
OO sc menu system. [possibly tricky but mostly tedious..?]

- write the query interface to the database within OO [pretty easy]

Some of the (many) things that I do not have a good grasp on are:
- which R functions are available to the calling app.  There is a list of 
functions listed in Chapter 5 of the "Writing R Extensions" doc.
But there is also a function defined as:
call_R(char*, long, void**, char**, long*, char**, long, char**);
which appears to provide access to all R functions.  Is this the case?

- how do R and optional R packages (such as Bioconductor) interact via libR.so?

- Do all optional packages have to be defined when building libR.so? (this 
doesn't sound right)  Or if not, how is libR.so informed that it has to load an 
additional package?

- Is this process integral to the runtime so that once Bioconductor or other 
package is installed via 'R INSTALL ..', libR.so can access them just like R?

Cheers, Harry
Harry J Mangalam - 949 856 2847 (v&f) - hjm at tacgi.com
             <<plain text preferred>>

More information about the R-devel mailing list