Muenchen, Robert A (Bob)
2007-Sep-20 13:08 UTC
[R] Cutting & pasting help examples into script window
Hi All, When I cut & paste help file examples into a script window, about half the time it pastes as a single long line. The steps I follow are: 1. Open a help file e.g. ?data.frame. 2. Select the examples at the bottom. 3. Choose File: Copy. 4. Return to the console. 5. Choose File: New script. 6. Choose File: Paste or do CTRL-V. The examples frequently paste as a single long line. I came across this in 2.6.0 beta on Windows XP & thought it was related to the cut/paste changes in that version. I went back to 2.5.1 and at first it worked fine, verifying my suspicion that it was a 2.6.0 problem. I double-checked my steps before posting, and to my surprise found that in both versions this problem is intermittent. I thought it might be a menu vs. keyboard CTRL-V difference, but found it happens with both, and in both versions. I have also fiddled with sizing or moving the Help window but that doesn't seem to be related. I did discover that may be a problem on the paste side of things, as so far it *always* pastes into Notepad correctly. Any ideas? Thanks, Bob P.S. What would really be slick would be to select the example in Help, right-click and choose Run Line or Selection. Perhaps in version 2.7. ;-) . ========================================================Bob Muenchen (pronounced Min'-chen), Manager, Statistical Consulting Center U of TN Office of Information Technology Stokely Management Center, Suite 200 916 Volunteer Blvd., Knoxville, TN 37996-0520 Voice: (865) 974-5230 FAX: (865) 974-4810 Email: muenchen at utk.edu Web: http://oit.utk.edu/scc Map: http://www.utk.edu/maps News: http://listserv.utk.edu/archives/statnews.html =========================================================
Stefan Grosse
2007-Sep-20 13:18 UTC
[R] Cutting & pasting help examples into script window
On Thursday 20 September 2007 15:08:45 Muenchen, Robert A (Bob) wrote: MR > Hi All, MR > MR > When I cut & paste help file examples into a script window, about half MR > the time it pastes as a single long line. MR > MR > Any ideas? MR > MR > Thanks, MR > Bob MR > MR > P.S. What would really be slick would be to select the example in Help, MR > right-click and choose Run Line or Selection. Perhaps in version 2.7. MR > ;-) . What I do not understand is why you not just type example(yourcommand)? Stefan
Muenchen, Robert A (Bob)
2007-Sep-20 17:49 UTC
[R] Cutting & pasting help examples into script window
Does this look like a bug? If so, is there a different way to report it? Thanks, Bob> -----Original Message----- > From: Dirk Eddelbuettel [mailto:edd at debian.org] > Sent: Thursday, September 20, 2007 10:17 AM > To: Muenchen, Robert A (Bob) > Subject: Re: [R] Cutting & pasting help examples into script window > > On Thu, Sep 20, 2007 at 10:01:03AM -0400, Muenchen, Robert A (Bob) > wrote: > > Stephan Grosse replied: > > > > > > > > What I do not understand is why you not just type > > example(yourcommand)? > > > > > > Stefan > > > > That's a good question. I want to play around with variations of the > > examples rather than run them exactly as they are. > > In Emacs' wonderful ESS mode, you just press 'l' and the line of > example code you're on gets sent to R. You can then 'pick it up' in > the R buffer and play with it. I do that all the time ... > > Dirk > > -- > Three out of two people have difficulties with fractions.