"R and Calc" is an OpenOffice.org (OO.o) Calc add-on that allows you to use R methods and functions. The software is currently in early development, though a basic working version does exist, and is available for download.

We welcome any and all comments and name suggestions. Please send them to Wojciech Gryc.

Contents

Requirements

You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.

OpenOffice.org 2.1

Java 5.0

RServe 0.4.7

Installing

The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls.

To use the add-on, you need to install R and Rserve. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click "enter" at the end of each bullet point:

install.packages("Rserve")

Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.

library(Rserve)

Rserve()

Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let's call the directory you unzipped it in <RA_DIR>. Now let <OO_HOME> be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to <OO_HOME>/program/ and type:

unopkg add <RA_DIR>/RAddon.uno.pkg

If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to <OO HOME>/program and type:

unopkg list

This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for "RAddon.uno.pkg". You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:

unopkg remove RAddon.uno.pkg

Finally, some operating systems require that you restart your OpenOffice.org installation (if you're not sure, restart your computer) to be able to see the cell functions that come with this package.

Using

Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on > Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:

rnorm(10)

cor.test(c(1,2,3,4), c(1,2,2,3))

Then click "Run". A new sheet should appear. Close the dialog with "Close" and check the new sheet -- you should see various pieces of information on the sheet.