R and Calc

From Apache OpenOffice Wiki
Revision as of 04:54, 15 May 2007 by Wojciech (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

"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.

For those who come here often, here is the latest version:

  • Version: 0.1.0
  • Release Date: May 15, 2007 (12:33 am)
  • Link:
  • Source Code:

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 1.5.0

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 (zipped file). 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

You should now be done!

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.

Testing

So far, the software has been tested on the following. Brackets describe the latest version tested on each system:

  • Fedora Core 6 (0.1.0)
  • Ubuntu Edgy Eft (0.1.0)

Known Issues

Yes, we already have some known issues! That's OK, these are common issues and are not problematic with regards to the code:

  • Issue #1: Strings and characters, when part of the R object model, do not get published in Rdump().

About

This add-on is the result of a Google Summer of Code 2007 project. It was initially created by Wojciech Gryc. For information pertaining to the development of this add-on, see Wojciech's Blog.

Personal tools