> Hi List, > I'm trying to get a bunch of hardened S+ users to switch to R. They won't > move because they have got addicted to the S+ (.ssc) > scripting files, available for MS windows versions. In these files you > highlight the code you want to execute by mouse, press an arrow in the > menu, and it fires it off to the S+ compiler directly. Is such a facility > actually available for Linux/Windows and Unix versions of R? Is there > something similar out there? > Regards, > Doug Beare >
> Hi List, > I'm trying to get a bunch of hardened S+ users to switch to R. They won't > move because they have got addicted to the S+ (.ssc) > scripting files, available for MS windows versions. In these files you > highlight the code you want to execute by mouse, press an arrow in the > menu, and it fires it off to the S+ compiler directly. Is such a facility > actually available for Linux/Windows and Unix versions of R? Is there > something similar out there? > Regards, > Doug Beare > >
Douglas Beare wrote:> >>Hi List, >>I'm trying to get a bunch of hardened S+ users to switch to R. They won't >>move because they have got addicted to the S+ (.ssc) >>scripting files, available for MS windows versions. In these files you >>highlight the code you want to execute by mouse, press an arrow in the >>menu, and it fires it off to the S+ compiler directly. Is such a facility >>actually available for Linux/Windows and Unix versions of R? Is there >>something similar out there? >>Regards, >>Doug BeareNot directly within R, but you can set up an editor to allow this kind of features. The recommended one is Emacs with ESS, but there are others as well (with different amounts of support). See http://cran.r-project.org/other-software.html and http://www.sciviews.org/_rgui/. Uwe Ligges
Hi, take a look at ESS: http://software.biostat.washington.edu/wikis/front/EmacsSpeaksStatistics detlef On 12-May-2003 Douglas Beare wrote:> > >> Hi List, >> I'm trying to get a bunch of hardened S+ users to switch to R. They won't >> move because they have got addicted to the S+ (.ssc) >> scripting files, available for MS windows versions. In these files you >> highlight the code you want to execute by mouse, press an arrow in the >> menu, and it fires it off to the S+ compiler directly. Is such a facility >> actually available for Linux/Windows and Unix versions of R? Is there >> something similar out there? >> Regards, >> Doug Beare >> > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help"There is no way to peace, peace is the way." -- Ghandi Detlef Steuer --- http://fawn.unibw-hamburg.de/steuer.html ***** Encrypted mail preferred *****
On Mon, 12 May 2003, Douglas Beare wrote:> > I'm trying to get a bunch of hardened S+ users to switch to R. They won't > > move because they have got addicted to the S+ (.ssc) > > scripting files, available for MS windows versions. In these files you > > highlight the code you want to execute by mouse, press an arrow in the > > menu, and it fires it off to the S+ compiler directly.Scripts shown via the `Display file' option in R for Windows do that (via Ctrl-V). It's not a compiler but an interpreter, BTW.> > Is such a facility > > actually available for Linux/Windows and Unix versions of R? Is there > > something similar out there?Not AFAIK for non-GUI versions of R (nor of S-PLUS). But various editors provide such a facility: see http://cran.r-project.org/other-software.html. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On Mon, 12 May 2003 12:31:33 +0100, Douglas Beare <D.Beare at marlab.ac.uk> wrote:> > >> Hi List, >> I'm trying to get a bunch of hardened S+ users to switch to R. They won't >> move because they have got addicted to the S+ (.ssc) >> scripting files, available for MS windows versions. In these files you >> highlight the code you want to execute by mouse, press an arrow in the >> menu, and it fires it off to the S+ compiler directly. Is such a facility >> actually available for Linux/Windows and Unix versions of R? Is there >> something similar out there?That's the nicest feature in the S-PLUS environment, and its something I'd like in Rgui (but it's not there yet, and it probably won't be there in 1.8.0 in the fall). There are various possibilities for replacements. If the users are comfortable in EMACS, then ESS provides something very similar. If they aren't, it might be worth learning. This is available on both Windows and Linux. Right now I'd say it's the best choice, but learning EMACS is non-trivial. Some external text editors in Windows (e.g. WinEDT) have macro packages that let you highlight and paste text to the R console quite easily. I don't know if this approach has been done on Linux. I don't use either of the above; I tend to develop in an external editor, and just use source() or plain old cut and paste to execute. There are also some new front-ends in the works. See the R-GUI web page http://www.r-project.org/GUI and mailing list for current status. Duncan Murdoch
Douglas Beare wrote:> >>Hi List, >>I'm trying to get a bunch of hardened S+ users to switch to R. They won't >>move because they have got addicted to the S+ (.ssc) >>scripting files, available for MS windows versions. In these files you >>highlight the code you want to execute by mouse, press an arrow in the >>menu, and it fires it off to the S+ compiler directly. Is such a facility >>actually available for Linux/Windows and Unix versions of R? Is there >>something similar out there? >>Regards, >>Doug BeareNot directly within R, but you can set up an editor to allow this kind of features. The recommended one is Emacs with ESS, but there are others as well (with different amounts of support). See http://cran.r-project.org/other-software.html and http://www.sciviews.org/_rgui/. Uwe Ligges In case you should decide using Emacs with ESS you can include the following lines in your ".emacs" startup-file: (global-set-key [f1] 'ess-eval-line) (global-set-key [f2] 'ess-eval-region) with this, you can execute your code line- or region-wise by hitting the f1 or f2 key, respectively; making things even more convenient, rather than remembering and executing: C-c C-j or C-c M-r or mouse-clicking. HTH Bernhard ---------------------------------------------------------------------- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender.
On 12-May-03 Douglas Beare wrote:>> I'm trying to get a bunch of hardened S+ users to switch to R. >> They won't move because they have got addicted to the S+ (.ssc) >> scripting files, available for MS windows versions. In these files >> you highlight the code you want to execute by mouse, press an arrow >> in the menu, and it fires it off to the S+ compiler directly. Is >> such a facility actually available for Linux/Windows and Unix >> versions of R? Is there something similar out there?Despite recent replies (though mind you I'm not a user of ESS so can't comment on what that offers, though my prior guess is that people who like the pointy-clicky mindset of Windows are unlikely to adapt painlessly to emacs), you can in fact do something very similar with X windows in Unix/Linux. I have often done it, both with script files I'm writing myself and especially with example scripts (sometimes complex applications such as in the README for Schafer's MIX, working through it task by task to see what happens along the way, sometimes the mini-examples which are appended to the help files for R functions). This works because in X windows highlighting a block of text automatically copies it into the "paste" buffer, and middle-clicking the mouse copies the "paste" buffer into whatever window is "in focus" at the moment of clicking. The procedure is very simple: 1. You have R running in an xterm in X windows. Either: 2. You have another file with "script" (i.e. R code) open in another X window (you may be viewing the file with say 'less' or you may be editing it using whatever text editor you prefer). Then: 3. Position the mouse pointer to the beginning of the code you want to highlight, press the left button, and drag it to the end, thus highlighting the whole block. Then: 4. Move the mouse to the R window; bring this to the top by clicking on its top bar, and then with the mouse anywhere inside the window, press the middle button. The highlighted R code will then be copied into the R command window and executed. (Depending on how your window-manager is configured, it may be possible to short-cut this: highlight the code, move the pointer inside the R window, and simply press middle button). Or: 5. You have been paging through a help file in the R window, and at the end there is some R code you want to try. While the pager is still up, highlight the block of code. Close the pager (e.g. with "q"). Then middle-click in the R window. Same effect as (4) above. Since the basic moves in this are (A) Highlight the code, followed by (B) Click the mouse, I don't see that this is any more demanding than what your Windows users are used to, or indeed any different at all! I hope this helps, Ted.