johannes rara
2009-Sep-19 07:44 UTC
[R] How to avoid copy-paste when copying code from this list?
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
Cedrick W. Johnson
2009-Sep-19 08:00 UTC
[R] How to avoid copy-paste when copying code from this list?
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. >