[R] How to avoid copy-paste when copying code from this list?

Cedrick W. Johnson cedrick at cedrickjohnson.com
Sat Sep 19 10:00:18 CEST 2009


At least in windows, if you right click directly in the r console, 
there's a command for 'Paste commands only' which may be one solution... 
Not sure about other platforms..

hth
c

johannes rara wrote:
> Hi,
>
> How do you people avoid copy-pasting and manual editing of the code
> posted in this list? I mean that if some one post a solution for an
> answer like this:
>
>   
>> a <- 1:10
>> a
>>     
>  [1]  1  2  3  4  5  6  7  8  9 10
>   
>> a[1:5]
>>     
> [1] 1 2 3 4 5
>   
>
> I have to copy-paste it to e.g. Tinn-R and remove "> " part of the
> line to try it in my R. When you keep doing this it gets quite
> annoying. How do you people avoid this (search and replace, perhaps?).
> The best way would be to able to send this straight from your e-mail
> reader into R (e.g. from gmail).
>
> -Johannes
>
> ______________________________________________
> R-help at 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.
>




More information about the R-help mailing list