[R] unix-type commandline keystrokes in the windows RGUI

Adaikalavan Ramasamy a.ramasamy at imperial.ac.uk
Thu Sep 18 10:11:24 CEST 2008

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

More information about the R-help mailing list