R and Calc Documentation

From Apache OpenOffice Wiki
Revision as of 06:35, 18 May 2007 by Wojciech (Talk | contribs)

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

Please note that this documentation is not for Version 0.1.0, but rather for an upcoming release. See the main R and Calc page for current documentation.

Cell Functions

  • RNDBLMAT( <command> , <matrix> , <matrix>): passes a command and two matrices. For example, RNDBLMAT("cov";A1:A100;B1:B100).
  • RNMAT( <command> , <matrix> ): passes a command and matrix as a parameter. For example, RNNUM("var";A1:A100).
  • RNNUM( <command> , <number> ): passes a command and a numeric parameter. For example, RNNUM("rnorm"; 1).
  • RSIMPLENUM( <command> ): passes a command to R, prints a number if one is returned.
  • RTESTCONNECTION(): tests R connection (for RServe).

R Add-On Menu

  • RDUMP(): creates a new spreadsheet with the object structure returned by a specific R script.

Tips & Tricks

Running External Libraries

At this time, it's not possible to load libraries ahead of time using Rserve. However, you can load a library through a function cell. The example below loads a library called sna and calls a function, passing a matrix as a parameter.

RNMAT("library(sna);gden"; A1:D4)

Personal tools