Dear R users / devs, There's been requests in the past for a text editor built into the Rgui for Windows, from which code can be submitted to the R console. Something along the lines of the script editor in S-Plus. Currently Rgui can only display a file read-only in a pager. As far as I can tell there's been little motivation to implement an editor, as most developers use (the excellent) ESS, or don't use Windows. I also use ESS, but the students here are taught S-Plus and learn to use the .ssc editor. I think it would be a good selling point if the equivalent existed for R, without the need to use an external editor (or a hack in Tcl/Tk). So I'd like to write one and contribute it. I've had a quick mess with the code, and I've now got a partially usable editor working. Before I go any further and implement it fully, I just wanted to ask whether this is a desirable thing for R. In case there are long-term plans to scrap and rewrite the whole Rgui code base... Any gotchas, dos or don'ts for writing this? I suppose we'd want something like a new R function file.edit to open the file for editing, analogously to file.show which opens a text file read-only. Currently edit() can be used to invoke an editor, but that seems to be designed to work on objects rather than files. Chris -- Christopher Jackson <chris.jackson@imperial.ac.uk>, Research Associate, Department of Epidemiology and Public Health, Imperial College School of Medicine, Norfolk Place, London W2 1PG, tel. 020 759 43371
On Wed, 25 Feb 2004 13:10:08 +0000, Chris Jackson <chris.jackson@imperial.ac.uk> wrote :>Dear R users / devs, > >There's been requests in the past for a text editor built into the Rgui >for Windows, from which code can be submitted to the R console. >Something along the lines of the script editor in S-Plus. ...>So I'd like to write one and contribute it.I think that would be fantastic.> I've had a quick mess with >the code, and I've now got a partially usable editor working. Before I >go any further and implement it fully, I just wanted to ask whether >this is a desirable thing for R. In case there are long-term plans to >scrap and rewrite the whole Rgui code base...The "graphapp" user interface library that Rgui currently uses is likely to disappear as soon as someone has the energy to replace it -- but this might not be soon. If you can write your editor in a way that it could avoid graphapp, or narrowly compartmentalize your calls to it (so that they could be replaced by calls to a different library relatively painlessly), that would be a very good thing. The other thing that may change sometime in the future is the whole event loop structure, but there will have to be an event loop of some sort, so we can hope that shouldn't affect you too much. I'll be happy to help you with any questions that come up. Duncan Murdoch
Chris Jackson <chris.jackson@imperial.ac.uk> writes:> editor. I think it would be a good selling point if the equivalent > existed for R, without the need to use an external editor (or a hack > in Tcl/Tk).Why is that a "hack"? I really must object. Tcl/Tk is a GUI framework with a text editing widget which can be trivially used for this kind of purpose (the same is likely true for other GUI frameworks like GTk). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
Duncan Murdoch <dmurdoch@pair.com>>The "graphapp" user interface library that Rgui currently uses is >likely to disappear as soon as someone has the energy to replace >it -- but this might not be soon.What is going to replace GraphApp?
On Feb 25, 2004, at 2:10 PM, Chris Jackson wrote:> There's been requests in the past for a text editor built into the > Rgui for Windows, from which code can be submitted to the R console. > Something along the lines of the script editor in S-Plus. Currently > Rgui can only display a file read-only in a pager. As far as I can > tell there's been little motivation to implement an editor, as most > developers use (the excellent) ESS, or don't use Windows. I also use > ESS, but the students here are taught S-Plus and learn to use the .ssc > editor.It may be of interest that our group is working on a GUI for R written in Java, i.e. it should be platform independent (at least we plan to support Windows, Mac and Linux). Among many other features this GUI includes such an script editor as described above. Data set editor mentioned in other posts in this thread is included, too. We are of course open for any further ideas or wishes. The official release is planned for the useR! 2004 conference in Vienna. Simon --- Simon Urbanek Department of computer oriented statistics and data analysis University of Augsburg Universit?tsstr. 14 86135 Augsburg Germany Tel: +49-821-598-2236 Fax: +49-821-598-2200 Simon.Urbanek@Math.Uni-Augsburg.de http://simon.urbanek.info
I am not sure whether or not this is feasible or even desirable but one thought, given the apparent substantial effort you have already undertaken, would be whether you move in the other direction, namely move the entire R core to Java (possibly using an automated converter if such exist) opening up R to new platforms not currently supported. --- Date: Wed, 25 Feb 2004 17:41:37 +0100 From: Simon Urbanek <Simon.Urbanek@math.uni-augsburg.de> To: Prof Brian Ripley <ripley@stats.ox.ac.uk> Cc: <r-devel@stat.math.ethz.ch>,Chris Jackson <chris.jackson@imperial.ac.uk> Subject: Re: [Rd] Script editor for Windows GUI On Feb 25, 2004, at 4:52 PM, Prof Brian Ripley wrote:> That's very interesting, but as you know Java installation can be quite > problematic. (It looks like the current Sun JVM 1.4.2_03 has several > issues, including not working with the R search engine, and a warning > on > mozilla.org about its Windows plugin.)I'm aware of the problems caused by various JVM versions. Although our Java code is not directly affected, we plan to supply an optional installer (for Windows) which will take care of the JVM and install an appropriate private JRE if necessary.> We bundled a version of Tcl/Tk with the R Windows binary to try to > avoid > compatibility issues, and even then I would prefer a native Windows > solution for this one.I'm definitely not against a native editor. I don't want to discourage Chris, especially if he has already a working prototype. To the contrary - one implicit point of my post was that we should stay in contact, since we have implemented an editor as well and thought about the interface and the features, so we could exchange our experiences. I also wanted to say that we may want to talk about bigger scope here. My concern is that the number of scattered GUIs for various platforms is increasing and each GUI has own interfaces, inconsistent with others, making it hard to switch between GUIs. If one wants to add functionality to the 'preferred' GUI then others don't have any benefit from the extension. A platform-independent GUI would solve this problem, since an improvement would affect all platforms. Furthermore using Java, it is possible to offer the quite powerful Java widget set to R users, seamlessly integrated into the GUI, thus allowing users to extend the GUI as they please - using R. (Besides, users could even integrate their own Java code with R, but that's another story...). By now we also have an own, working Java graphics device allowing us to achieve really tight integration of all aspects of R. I don't claim that this should replace the Windows GUI, but I think it might be an interesting, flexible alternative. I know that the project is all but easy, nevertheless I believe that we got quite far by now. Simon --- Simon Urbanek Department of computer oriented statistics and data analysis University of Augsburg Universitätsstr. 14 86135 Augsburg Germany Tel: +49-821-598-2236 Fax: +49-821-598-2200 Simon.Urbanek@Math.Uni-Augsburg.de http://simon.urbanek.info
I just have one question. From my very little (and negative) experience with the Java GUI for S-PLUS on *nix, one big problem is that it doesn't work when running S-PLUS remotely, either via X or VNC (unless the display is 8-bit): The GUI is running, but on screen I just see one big black rectangle. Would this be a problem for R as well? My impression was that that is totally the problem with Java. (BTW, I believe S-PLUS also installs and uses its private JRE.) Best, Andy> From: Simon Urbanek > > On Feb 25, 2004, at 4:52 PM, Prof Brian Ripley wrote: > > > That's very interesting, but as you know Java installation > can be quite > > problematic. (It looks like the current Sun JVM 1.4.2_03 > has several > > issues, including not working with the R search engine, and > a warning > > on > > mozilla.org about its Windows plugin.) > > I'm aware of the problems caused by various JVM versions. > Although our > Java code is not directly affected, we plan to supply an optional > installer (for Windows) which will take care of the JVM and > install an > appropriate private JRE if necessary. > > > We bundled a version of Tcl/Tk with the R Windows binary to try to > > avoid > > compatibility issues, and even then I would prefer a native Windows > > solution for this one. > > I'm definitely not against a native editor. I don't want to > discourage > Chris, especially if he has already a working prototype. To the > contrary - one implicit point of my post was that we should stay in > contact, since we have implemented an editor as well and > thought about > the interface and the features, so we could exchange our experiences. > > I also wanted to say that we may want to talk about bigger > scope here. > My concern is that the number of scattered GUIs for various platforms > is increasing and each GUI has own interfaces, inconsistent with > others, making it hard to switch between GUIs. If one wants to add > functionality to the 'preferred' GUI then others don't have > any benefit > from the extension. A platform-independent GUI would solve this > problem, since an improvement would affect all platforms. Furthermore > using Java, it is possible to offer the quite powerful Java > widget set > to R users, seamlessly integrated into the GUI, thus allowing > users to > extend the GUI as they please - using R. (Besides, users could even > integrate their own Java code with R, but that's another > story...). By > now we also have an own, working Java graphics device allowing us to > achieve really tight integration of all aspects of R. I don't claim > that this should replace the Windows GUI, but I think it might be an > interesting, flexible alternative. I know that the project is all but > easy, nevertheless I believe that we got quite far by now. > > Simon > > --- > Simon Urbanek > Department of computer oriented statistics and data analysis > University of Augsburg > Universit?tsstr. 14 > 86135 Augsburg > Germany > > Tel: +49-821-598-2236 > Fax: +49-821-598-2200 > > Simon.Urbanek@Math.Uni-Augsburg.de > http://simon.urbanek.info > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel > >------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}}
A personal vote would be to make use of the Eclipse IDE, an IDE originally written for Java but also now being used for other languages, including C#, COBOL, and ( unless I am mistaken ) the MacroMedia "MX" product suite. Although the Eclipse IDE suffers from many of the usual problems in Java, it is a reasonable compromise. Over time, as a part of Eclipse, one is apt to build in the use of an intemediate layer based upon the use of an abstract syntax tree or stack machine to which "R" is compiled. Depending upon one preference, that layer is apt to be the Java JVM, the new Parrot virtual machine used in PERL 6, a .NET-type of approach, or ( perhaps best ) whatever Luke Tierney decides on. So you think of the script editor and IDE as also linked into the long term evolution of "R" as a language. -----Original Message----- From: r-devel-bounces@stat.math.ethz.ch [mailto:r-devel-bounces@stat.math.ethz.ch] On Behalf Of Chris Jackson Sent: Wednesday, February 25, 2004 8:10 AM To: r-devel@stat.math.ethz.ch Subject: [Rd] Script editor for Windows GUI Dear R users / devs, There's been requests in the past for a text editor built into the Rgui for Windows, from which code can be submitted to the R console. Something along the lines of the script editor in S-Plus. Currently Rgui can only display a file read-only in a pager. As far as I can tell there's been little motivation to implement an editor, as most developers use (the excellent) ESS, or don't use Windows. I also use ESS, but the students here are taught S-Plus and learn to use the .ssc editor. I think it would be a good selling point if the equivalent existed for R, without the need to use an external editor (or a hack in Tcl/Tk). So I'd like to write one and contribute it. I've had a quick mess with the code, and I've now got a partially usable editor working. Before I go any further and implement it fully, I just wanted to ask whether this is a desirable thing for R. In case there are long-term plans to scrap and rewrite the whole Rgui code base... Any gotchas, dos or don'ts for writing this? I suppose we'd want something like a new R function file.edit to open the file for editing, analogously to file.show which opens a text file read-only. Currently edit() can be used to invoke an editor, but that seems to be designed to work on objects rather than files. Chris -- Christopher Jackson <chris.jackson@imperial.ac.uk>, Research Associate, Department of Epidemiology and Public Health, Imperial College School of Medicine, Norfolk Place, London W2 1PG, tel. 020 759 43371 ______________________________________________ R-devel@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
Simon, This is very interesting and very much in keeping with the direct I woudl like to take with my own work. We have several Java components that have a realtime event-driven data stream and would very much like to integrate these with R using something like the callback mechanism in SJava and then build GUI components on top of them. We were considering using tck/tk widgets for the GUI but it would be much better to use Java. Is you project based upon the SJava package, because we have had lots of problems with the callback interface? Would you consider releasing your work in progress under the GPL? We are keen to avoid re-inventing things and its a long time until we are all at UseR! - we could at the very least give some user feedback. On a slightly different tack, I have recently taken a look at Jython - an implementation of Python in Java that produces byte code that runs on the JVM. Combined with this there is a project called xoltar which aims to bring functional programming to Python. This got me thinking that a R parser could be written in Java for a core set of functionality allowing code and packages written in "pure-R" to be compiled as byte code and run on the JVM. Then one could call the SJava package from Java to execute anything unusual in R proper.... any thoughts? PS in terms of a script editor for R ... take a look at the JEdit project which already supports R and S+ syntax highlighting. There is a plugin called Sidekick which provides a framework for high-level language-specific features, such as a structure tree, and code completion... it's all written in Java so it could be extended to work with R. Regards, John> -----Original Message----- > From: r-devel-bounces@stat.math.ethz.ch > [mailto:r-devel-bounces@stat.math.ethz.ch]On Behalf Of Simon Urbanek > Sent: 25 February 2004 16:42 > To: Prof Brian Ripley > Cc: r-devel@stat.math.ethz.ch; Chris Jackson > Subject: Re: [Rd] Script editor for Windows GUI > > Furthermore using Java, it is possible to offer the quite powerful Java > widget set to R users, seamlessly integrated into the GUI, thus allowing > users to extend the GUI as they please - using R. (Besides, users couldeven> integrate their own Java code with R, but that's another > story...). By > now we also have an own, working Java graphics device allowing us to > achieve really tight integration of all aspects of R. I don't claim > that this should replace the Windows GUI, but I think it might be an > interesting, flexible alternative. I know that the project is all but > easy, nevertheless I believe that we got quite far by now. >> -----Original Message----- > From: r-devel-bounces@stat.math.ethz.ch > [mailto:r-devel-bounces@stat.math.ethz.ch]On Behalf Of Simon Urbanek > Sent: 25 February 2004 15:17 > To: Chris Jackson > Cc: r-devel@stat.math.ethz.ch > Subject: Re: [Rd] Script editor for Windows GUI > > > It may be of interest that our group is working on a GUI for > R written > in Java, i.e. it should be platform independent (at least we plan to > support Windows, Mac and Linux). Among many other features this GUI > includes such an script editor as described above. Data set editor > mentioned in other posts in this thread is included, too. We are of > course open for any further ideas or wishes. The official release is > planned for the useR! 2004 conference in Vienna. > > Simon********************************************************************** This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}}