Re: [R] unix-type commandline keystrokes in the windows RGUI
Adaikalavan Ramasamy wrote: ... Anyway, here is how to do what you want: 1) Install bash on your Windows machine - You can use cgywin. Or download and unzip http://www.steve.org.uk/Software/bash/ 2) Make the directory to bash.exe and R.exe are in your PATH variable. 3) Start - Run - cmd 4) Start R.exe and now you should have your CTRL-R functionality (along with ls and other bash goodies). Yes, I know you asked about Rgui.exe and not R.exe. But this is the best I can do. Er, I don't think you need bash nor cygwin for this, do you? It is not normal that the shell has any influence on programs that run under it. Plain Rterm in a console should do it, if and only if linked agaist libreadline, which I believe it is. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] unix-type commandline keystrokes in the windows RGUI
wow, ok, thanks everyone lots for me to explore. I will take some time, and if none of these achieve what I'm trying to get at I will come back here. Thanks! Mike Adaikalavan Ramasamy wrote: Well, I don't see why you need the CTRL-R functionality when you can just as rapidly and efficiently using SEARCH functionality in scripts too (CTRL-F in most applications, CTRL-S in emacs etc). BTW, I am quite familiar with Unix, Linux and Sun Solaris and what CTRL-R does (yes, I used it frequently). Which is why I am able to tell you that CTRL-R will pull up all matching commands - even commands that had failed! At least in a script environment, you tend to correct failed commands. So you know when you search scripts, it will likely be the correct command. To summarize my view, I feel that CTRL-R is appropriate for shell operations where one codes on the fly while using a search functionality and scripting is appropriate for a scientific programming software. Anyway, here is how to do what you want: 1) Install bash on your Windows machine - You can use cgywin. Or download and unzip http://www.steve.org.uk/Software/bash/ 2) Make the directory to bash.exe and R.exe are in your PATH variable. 3) Start - Run - cmd 4) Start R.exe and now you should have your CTRL-R functionality (along with ls and other bash goodies). Yes, I know you asked about Rgui.exe and not R.exe. But this is the best I can do. By all means go bother the R developers (most of whom I suspect are on the mailing list). I will be interested in what they say. Regards, Adai mfrumin wrote: Adaikalavan, thanks. Perhaps I was not so specific enough in what I want, for those not so familiar with unix commandline featuers. I'm looking for the 'reverse search' functionality where you hit CTRL-R, then start typing a bit of text and it finds previous commands with that bit of text, which you just hit enter to execute. I already do write tons of code/scripts in R (using Emacs in fact!). But one of the great features of R/SPSS/Matlab/etc is that they are interactive environments. Thus, I spend lots of time issuing commands as well as writing code. I want to be able to search back through those commands as rapidly and efficiently as you can in the unix (and R unix) commandline. Another way to think about this is -- the unix commandline environment is a scripting environment where you can use emacs. Yet users of unix love the CTRL-R functionality anyway (they wrote it!). So, any suggestions to help do what I specifically asked, or should I go bother the R developers? thanks, Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] unix-type commandline keystrokes in the windows RGUI
Ah, I didn't realize Rterm existed (Start - Run - Rterm). It works with CTRL-R as you said. Thank you! Regards, Adai Peter Dalgaard wrote: Adaikalavan Ramasamy wrote: ... Anyway, here is how to do what you want: 1) Install bash on your Windows machine - You can use cgywin. Or download and unzip http://www.steve.org.uk/Software/bash/ 2) Make the directory to bash.exe and R.exe are in your PATH variable. 3) Start - Run - cmd 4) Start R.exe and now you should have your CTRL-R functionality (along with ls and other bash goodies). Yes, I know you asked about Rgui.exe and not R.exe. But this is the best I can do. Er, I don't think you need bash nor cygwin for this, do you? It is not normal that the shell has any influence on programs that run under it. Plain Rterm in a console should do it, if and only if linked agaist libreadline, which I believe it is. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] unix-type commandline keystrokes in the windows RGUI
Why not use a script? I feel that it is much better than using the history via [CTRL]-R in unix, which also pulls up errorneous commands. A script is vital for statistical analysis and research where you may want to or be asked to repeat or reproduce the analysis months later. Rgui (on windows) has a built in script editor. There are many external editors capable of working with R. My recommendation is to use emacs via ESS (emacs speaks statistics) which works in most, if not all, operating systems and has a Unix feel to it. If you insist on wanting to use [CTRL]-R like features, then have a look at history() within R. You can also try installing cgywin or bash etc and see if that works from the DOS prompt. Regards, Adai mfrumin wrote: Hi all, I am generally quite fond of the unix commandline keystrokes (e.g. searching back in your history with [CTRL]-R, and cutting/pasting with [CTRL]-K/Y) which work in the R commandline in *nix. Does anyone know if there's any way to get similar functionality in the Windows RGUI? I know that as of now, [CTRL]-A and -E do the same as unix (beginning and end of line) and [CTRL]-Y does a paste, but [CTRL]-K crops from the cursor to the end of the line but doesn't put the text into the clipboard. the most important thing I want is the [CTRL]-R functionality which is so poorly approximated by pressing the up arrow a million times. I've searched on the archives and didn't find anything about this. Any thoughts? Thanks, Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] unix-type commandline keystrokes in the windows RGUI
On Sep 17, 2008, at 9:26 AM, mfrumin wrote: Hi all, I am generally quite fond of the unix commandline keystrokes (e.g. searching back in your history with [CTRL]-R, and cutting/pasting with [CTRL]- K/Y) which work in the R commandline in *nix. Does anyone know if there's any way to get similar functionality in the Windows RGUI? I know that as of now, [CTRL]-A and -E do the same as unix (beginning and end of line) and [CTRL]-Y does a paste, but [CTRL]-K crops from the cursor to the end of the line but doesn't put the text into the clipboard. the most important thing I want is the [CTRL]-R functionality which is so poorly approximated by pressing the up arrow a million times. I've searched on the archives and didn't find anything about this. Any thoughts? My memory from using RGUI in Windows is that up-arrow provided that functionality. I do not remember needing to do any special set-up to get that behavior. It is mentioned on p2 of http://www.wcsmalaysia.org/stats/PDF/Starting_R.pdf so I think my memory is still working. -- David Winsemius Heritage Laboratories __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] unix-type commandline keystrokes in the windows RGUI
Adaikalavan, thanks. Perhaps I was not so specific enough in what I want, for those not so familiar with unix commandline featuers. I'm looking for the 'reverse search' functionality where you hit CTRL-R, then start typing a bit of text and it finds previous commands with that bit of text, which you just hit enter to execute. I already do write tons of code/scripts in R (using Emacs in fact!). But one of the great features of R/SPSS/Matlab/etc is that they are interactive environments. Thus, I spend lots of time issuing commands as well as writing code. I want to be able to search back through those commands as rapidly and efficiently as you can in the unix (and R unix) commandline. Another way to think about this is -- the unix commandline environment is a scripting environment where you can use emacs. Yet users of unix love the CTRL-R functionality anyway (they wrote it!). So, any suggestions to help do what I specifically asked, or should I go bother the R developers? thanks, Mike Adaikalavan Ramasamy-2 wrote: Why not use a script? I feel that it is much better than using the history via [CTRL]-R in unix, which also pulls up errorneous commands. A script is vital for statistical analysis and research where you may want to or be asked to repeat or reproduce the analysis months later. Rgui (on windows) has a built in script editor. There are many external editors capable of working with R. My recommendation is to use emacs via ESS (emacs speaks statistics) which works in most, if not all, operating systems and has a Unix feel to it. If you insist on wanting to use [CTRL]-R like features, then have a look at history() within R. You can also try installing cgywin or bash etc and see if that works from the DOS prompt. Regards, Adai mfrumin wrote: Hi all, I am generally quite fond of the unix commandline keystrokes (e.g. searching back in your history with [CTRL]-R, and cutting/pasting with [CTRL]-K/Y) which work in the R commandline in *nix. Does anyone know if there's any way to get similar functionality in the Windows RGUI? I know that as of now, [CTRL]-A and -E do the same as unix (beginning and end of line) and [CTRL]-Y does a paste, but [CTRL]-K crops from the cursor to the end of the line but doesn't put the text into the clipboard. the most important thing I want is the [CTRL]-R functionality which is so poorly approximated by pressing the up arrow a million times. I've searched on the archives and didn't find anything about this. Any thoughts? Thanks, Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/unix-type-commandline-keystrokes-in-the-windows-RGUI-tp19532125p19536486.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] unix-type commandline keystrokes in the windows RGUI
Look at GNU Emacs with ESS, you'll get what you want out of the box --- and much more! See http://vgoulet.act.ulaval.ca/en/emacs [shameless plug] for a distribution of Emacs bundled with ESS. HTH Vincent Le mer. 17 sept. à 09:26, mfrumin a écrit : Hi all, I am generally quite fond of the unix commandline keystrokes (e.g. searching back in your history with [CTRL]-R, and cutting/pasting with [CTRL]- K/Y) which work in the R commandline in *nix. Does anyone know if there's any way to get similar functionality in the Windows RGUI? I know that as of now, [CTRL]-A and -E do the same as unix (beginning and end of line) and [CTRL]-Y does a paste, but [CTRL]-K crops from the cursor to the end of the line but doesn't put the text into the clipboard. the most important thing I want is the [CTRL]-R functionality which is so poorly approximated by pressing the up arrow a million times. I've searched on the archives and didn't find anything about this. Any thoughts? Thanks, Mike -- View this message in context: http://www.nabble.com/unix-type-commandline-keystrokes-in-the-windows-RGUI-tp19532125p19532125.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] unix-type commandline keystrokes in the windows RGUI
Mike, There are several options to pursue, depending on your answer to the question: Why are you staying within the Rgui if you are already an Emacs ESS user? 1. If you don't need any other feature of Rgui on Windows, then don't use it. From emacs, enter M-x R and you will immediately be inside the *R* buffer running R. All emacs features immediately work the way you expect them to work. 2. If you need another feature of Rgui (and I know of one: rcom and Rgui work together smoothly, rcom and *R* are not comfortable together), then try the experimental ESS command M-x Rgui that I added to ESS in March 2008. Full documentation of M-x Rgui is part of the ESS distribution in file .../ess/doc/rgui-doc.txt The specific request for live history from the Rgui is in principle easy to design in this setting. Here are the steps: 1. Send to Rgui the command history() and redirect the response to a file. 2. Open the file in emacs. 3. Pick your specific command to send back or to edit. 4. Send revised command back to Rgui, and close history file. It shouldn't be too hard to put this sequence on a function key. Let me know if the design does what you want. Rich __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] unix-type commandline keystrokes in the windows RGUI
Well, I don't see why you need the CTRL-R functionality when you can just as rapidly and efficiently using SEARCH functionality in scripts too (CTRL-F in most applications, CTRL-S in emacs etc). BTW, I am quite familiar with Unix, Linux and Sun Solaris and what CTRL-R does (yes, I used it frequently). Which is why I am able to tell you that CTRL-R will pull up all matching commands - even commands that had failed! At least in a script environment, you tend to correct failed commands. So you know when you search scripts, it will likely be the correct command. To summarize my view, I feel that CTRL-R is appropriate for shell operations where one codes on the fly while using a search functionality and scripting is appropriate for a scientific programming software. Anyway, here is how to do what you want: 1) Install bash on your Windows machine - You can use cgywin. Or download and unzip http://www.steve.org.uk/Software/bash/ 2) Make the directory to bash.exe and R.exe are in your PATH variable. 3) Start - Run - cmd 4) Start R.exe and now you should have your CTRL-R functionality (along with ls and other bash goodies). Yes, I know you asked about Rgui.exe and not R.exe. But this is the best I can do. By all means go bother the R developers (most of whom I suspect are on the mailing list). I will be interested in what they say. Regards, Adai mfrumin wrote: Adaikalavan, thanks. Perhaps I was not so specific enough in what I want, for those not so familiar with unix commandline featuers. I'm looking for the 'reverse search' functionality where you hit CTRL-R, then start typing a bit of text and it finds previous commands with that bit of text, which you just hit enter to execute. I already do write tons of code/scripts in R (using Emacs in fact!). But one of the great features of R/SPSS/Matlab/etc is that they are interactive environments. Thus, I spend lots of time issuing commands as well as writing code. I want to be able to search back through those commands as rapidly and efficiently as you can in the unix (and R unix) commandline. Another way to think about this is -- the unix commandline environment is a scripting environment where you can use emacs. Yet users of unix love the CTRL-R functionality anyway (they wrote it!). So, any suggestions to help do what I specifically asked, or should I go bother the R developers? thanks, Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.