From b.rowlingson at lancaster.ac.uk  Thu Mar 29 14:07:29 2007
From: b.rowlingson at lancaster.ac.uk (Barry Rowlingson)
Date: Thu, 29 Mar 2007 13:07:29 +0100
Subject: [Rd] Bridging R to OpenOffice
In-Reply-To: <3B913F96-E9A0-4219-AEB4-00408E3D6055@sympatico.ca>
References: <Pine.LNX.4.44.0703281210390.31714-100000@reclus.nhh.no>	<200703280648.54111.sdavis2@mail.nih.gov>	<460A6B89.8030903@sun.com>	<200703280933.45736.sdavis2@mail.nih.gov>	<460A8C77.2040009@biostat.ku.dk>
	<3B913F96-E9A0-4219-AEB4-00408E3D6055@sympatico.ca>
Message-ID: <460BAC01.1080104@lancaster.ac.uk>

Kevin B. Hendricks wrote:

> As I remember, I think someone has built an interface from Gnumeric  
> to R if I am not mistaken.  That project if it is still alive might  
> provide a nice model of how to interface from a spreadsheet to R  
> without lots of GUI front end stuff being needed.  As I remember, it  
> just allowed a number of advanced features from R to be used from  
> within GNumeric (just as if you added an analysis toolpack to Excel)

It seems to me from looking at the R-Excel and R-Gnumeric connections 
that these things work at a cell-based level, where you can put a value 
in a cell from an R function (eg =rpois(4)) or you can transfer values 
back and forth to R objects from spreadsheet cells.

  But where's the bigger picture? Can we think at an analysis/sheet level?

  You could have your X and Y data in Sheet1, click some button, and 
then have a Sheet1_lm sheet appear, containing the information from R's 
summary(lm(Y~X)), columns of fitted values and residuals, and plots of 
fitted values vs residuals etc - the plots you get from plot(lm(Y~X)) - 
but made with the spreadsheet's plot engine rather than R's.

  Of course this may be a bit to spssxy for some.

  The cell-level access seems more trouble than its worth for anyone 
actually concerned with doing an analysis - they'd have to know R and 
would probably find it easier importing the data and doing it in R. I 
can only see it being worthwhile for creating a spreadsheet with a bunch 
of R code embedded in cells in order to pass a bespoke analysis on to 
someone with no R knowledge. Instead of saying "Here's my R Code to do 
heterogeneous boomsquaddling", and them going "Your what code?", you'd 
say, "here, load boomsquaddle.xls, stick your data in column A, the 
boomsquaddle factor appears in cell X23".

  Is anyone collecting actual R & spreadsheet use cases or is this a 
case of 'hey this would be a neat thing to do'?

Barry



[Rd] Bridging R to OpenOffice
Barry Rowlingson