[Rd] automatic "paste" filter to paste only the commands from a transcript on the clipboard

Tony Plate tplate at blackmesacapital.com
Wed Jan 14 17:47:51 MET 2004


Just for fun (and actually because I would use it too) I wrote a
version of the "paste" menu command that assumes the clipboard
contains a transcript, and just pastes the commands from it into
the R console window (Windows GUI only).

So, if something like this:

 > foo <-
+ 33
 > foo * 3
[1] 99
 > foo
[1] 33

is on the clipboard, then the "paste commands" menu command will just paste

foo <-
33
foo * 3
foo

into the console window. (Resulting in this case in the original contents
of the clipboard being reproduced in the console window.)

Is anyone interested in having this functionality in R?

If there's enough interest in this to incorporate it into R, I'll package it
up as a patch (I did it in R 1.8.1).  (BTW, I only implemented it for the
Windows GUI, but it was pretty simple, so I'm sure if there's much
interest someone could easily port it to other GUIs).

-- Tony Plate



More information about the R-devel mailing list