[R-SIG-Mac] If you're well and truly bored you might want to play with this...

Byron Ellis bellis at hsph.harvard.edu
Fri Mar 28 17:58:17 MET 2003


Yeah, since R is running out-of-process (via an NSTask) it should let  
you do out-of-line graphics (you could even use REventLoop or Tk or  
whatever as well). Having a framework build of R (a la Python) would be  
sort of cool, though I don't know how much it would be used unless R  
were to towards always being embedded (the normal CLI and R Carbon  
interfaces just being other instances of an embedding application). It  
looks like things are moving in that direction from the codebase. On  
the other hand there is something appealing about having the "kernel"  
type of structure (with R running as a separate process) as it  
potentially lets you execute code on, say, the large server in the  
basement from your laptop...

Anyways, I'm glad people are checking it out and that it hasn't set  
anything on fire yet :-)

On Friday, March 28, 2003, at 12:51  AM, Jan de Leeuw wrote:

> Funky. There is a way to get graphics from StatPaper. Just type
>
> quartz()
> demo(graphics)
>
> and evaluate the document. Unfortunately the graphics window
> does not respond to events. My guess is that for this to work,
> R should sit in StatPaper, or should be part of a framework
> build.
>
> On Thursday, Mar 27, 2003, at 01:28 US/Pacific, Byron Ellis wrote:
>
>> Hi folks, as I was recently stuck on a plane from Boston to LA I  
>> finally got started coding a Mathematica/Maple-style notebook  
>> interface for R... I made several abortive attempts on the Windows  
>> platform and finally got a technology test working under Cocoa during  
>> the flight (and the last couple of days).  You can play with a copy  
>> here: http://www.people.fas.harvard.edu/~bcellis/StatPaper.app.tar.gz
>>
>> Mostly it serves me as a cool toy that makes relatively deep use of  
>> the Cocoa APIs. It also helps me think about using R as a "kernel."  
>> Like, what happens when I have two documents? How do I get graphics  
>> out without having to resort to an intermediate file? (Oh how I wish  
>> devices could take a connection... then I could just pipe the PDF  
>> output directly to an NSImage and be done with it... but I should  
>> probably find a less hackish solution. Suggestions willing accepted  
>> :-))
>>
>> Just decompress it. And it should run fine (at least it did under  
>> 10.2.4 :-))
>> As its a tech test is comes with a set of caveats as long as my arm  
>> (including, but not limited to):
>> 	* Assumes you have R installed in the usual place  
>> (/usr/local/lib/R). I'm using Jan's build of 1.6.2. It doesn't embed  
>> or anything (it employs --slave, sort of) so as long as you can  
>> execute R it should actually load the engine. There will be  
>> approximately 0 helpful error messages if it doesn't load.
>> 	* You can't save or load documents
>> 	* Opening a second document might cause your computer to explode. It  
>> will definitely cause strange things to happen
>> 	  as it only uses a single (global) R session for computation. I'm  
>> not sure how to work around this.
>> 	* You can only execute the entire document at once. The code to  
>> execute a single block is pretty trivial, I just haven't hooked it up  
>> to the WindowController
>>             yet
>> 	* trying to use graphics will probably result in horrific  
>> explosions. Obviously inline graphics are a high priority, but as  
>> mentioned above, I'm not sure how it would be done.
>> 	* I'm not particularly fond of the name... but the project had to be  
>> called -something-.
>> 	* Its a tech test, I'd be more surprised if it works than if it  
>> doesn't :-)
>>
>> Just sort of tossing it out there since there seems to be a good deal  
>> of GUI development focused on more abstract Stata/Spreadsheet-like  
>> interfaces rather than more document-like interfaces. At the very  
>> least its the beginning of a nearly WYSIWYG vignette editor :-)
>>
>> Enjoy
>>
>> Byron Ellis (bellis at hsph.harvard.edu)
>> "Oook" - The Librarian
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-mac
>>
>>
> ===
> Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
> Editor: Journal of Multivariate Analysis, Journal of Statistical  
> Software
> US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
> phone (310)-825-9550;  fax (310)-206-5658;  email:  
> deleeuw at stat.ucla.edu
> homepage: http://gifi.stat.ucla.edu
>   
> ----------------------------------------------------------------------- 
> --------------------------
>           No matter where you go, there you are. --- Buckaroo Banzai
>                    http://gifi.stat.ucla.edu/sounds/nomatter.au
>   
> ----------------------------------------------------------------------- 
> --------------------------
>
>
Byron Ellis (bellis at hsph.harvard.edu)
"Oook" - The Librarian



More information about the R-SIG-Mac mailing list