I am using R 1.6.1 on Windows. I usually write/edit code in the R console, and when I get it working right, copy and paste it to a text file for later use. In Splus for Windows, this could be done easily using just the keyboard, with up-arrow, shift-end or shift-home, ctrl-c, etc. But in R, the shift key doesn't select text. The only way I can select text in R is with the mouse. Does anyone know how to select text in R using only the keyboard? Many thanks, Paul. Paul Livingstone Statistical Analyst AeroStructures? Level 14, 222 Kingsway South Melbourne, Vic, 3205 Phone: 03 9694 1083 Mobile: 0418 121 530 Fax: 03 9696 8195 Email: paul.livingstone at aerostructures.com.au Web: www.aerostructures.com.au
On Tue, 21 Oct 2003, Paul Livingstone wrote:> I am using R 1.6.1 on Windows. I usually write/edit code in the R console, > and when I get it working right, copy and paste it to a text file for later > use. In Splus for Windows, this could be done easily using just the > keyboard, with up-arrow, shift-end or shift-home, ctrl-c, etc. > > But in R, the shift key doesn't select text. The only way I can select text > in R is with the mouse. Does anyone know how to select text in R using only > the keyboard?No. If you think this would be a useful contribution, please send a patch against the current R sources (1.9.0-to-be, not 1.6.1). -- 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
I have a different wish: I want to be able to mouseclick in the middle of a line to get the cursor there (as in SPlus). While I appreciate that to get my wish I should just write a little patch, I estimate it would take me about 2 years to reach the point where I was capable of it, assuming I did nothing else, and I would certainly have to understand Windows, which in previous brushes I have found to be very bad for the brain. I can live without it. Paul - in the meantime you might type savehistory() and then edit .Rhistory in your favourite keyboard-friendly editor.> -----Original Message----- > From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] > Sent: 21 October 2003 07:51 > To: Paul Livingstone > Cc: R-Help > Subject: Re: [R] select text using only the keyboard > > > Security Warning: > If you are not sure an attachment is safe to open please contact > Andy on x234. There are 0 attachments with this message. > ________________________________________________________________ > > On Tue, 21 Oct 2003, Paul Livingstone wrote: > > > I am using R 1.6.1 on Windows. I usually write/edit code in the R > console, > > and when I get it working right, copy and paste it to a > text file for > later > > use. In Splus for Windows, this could be done easily using just the > > keyboard, with up-arrow, shift-end or shift-home, ctrl-c, etc. > > > > But in R, the shift key doesn't select text. The only way I can > select text > > in R is with the mouse. Does anyone know how to select text in R > using only > > the keyboard? > > No. > > If you think this would be a useful contribution, please send a patch > against the current R sources (1.9.0-to-be, not 1.6.1). > > -- > 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 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >Simon Fear Senior Statistician Syne qua non Ltd Tel: +44 (0) 1379 644449 Fax: +44 (0) 1379 644445 email: Simon.Fear at synequanon.com web: http://www.synequanon.com Number of attachments included with this message: 0 This message (and any associated files) is confidential and\...{{dropped}}
Simon Fear wrote:> I have a different wish: I want to be able to mouseclick in > the middle of a line to get the cursor there (as in SPlus). > > While I appreciate that to get my wish I should just write > a little patch, I estimate it would take me about 2 years > to reach the point where I was capable of it, assuming I > did nothing else, and I would certainly have to understand > Windows, which in previous brushes I have found to be > very bad for the brain.Or you could get a copy of (X)Emacs, and use ESS. Total install and learning warm-up time should be in the order of a week at most. It does all these nice things, and much more. In my short experience with it, XEmacs plays nicer with ESS under Windows than GNU Emacs - YMMV. Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 jasont at indigoindustrial.co.nz
Simon,> I have a different wish: I want to be able to mouseclick in > the middle of a line to get the cursor there (as in SPlus). > > While I appreciate that to get my wish I should just write > a little patch, I estimate it would take me about 2 years > to reach the point where I was capable of it,Depends on how much C programming you've done. I could possibly write a patch in less than 2 years, but I have other things which are higher priority right now. Here are some things you would need to look at: Mouse-button event-handlers in GraphApp: http://www.cs.usyd.edu.au/~graphapp/doc/manual/mouse.htm Setting the cursor position/selection in a text window in GraphApp: http://www.cs.usyd.edu.au/~loki/graphapp/manual/textedit.htm Building R for Windows: http://www.stats.ox.ac.uk/pub/Rtools/ Regards, James