[R] productivity tools in R?

cls59 chuck at sharpsteen.net
Fri Jul 3 21:30:09 CEST 2009



Duncan Murdoch-2 wrote:
> 
> 
> cls59 wrote:
>> 
>>> I recently noticed that the Mac GUI contains a way to do block
>>> selection- so
>>> you can select just the code you want to copy and exclude the prompts.
>>> Just
>>> hold down the option key and the text cursor will turn into a crosshair
>>> which allows you to exclude the prompt column while you select.
>> 
> 
> But doesn't that require you to edit out results?  The nice thing in the 
> Windows Rgui is that it does everything for you.  So I can take a block 
> of text like
> 
>  > x <- 1
>  > x
> [1] 1
>  > y <- 2
>  > y
> [1] 2
>  > x + y
> [1] 3
> 
> and cut and "paste commands only" to re-execute it, without manually 
> editing out the [1] 1, [1] 2, [1] 3 lines.  (Tony Plate contributed this 
> code way back in R 1.9.0; thanks Tony!)
> 
> 

You're right, with the Mac GUI one still has to copy blocks of code and
dodge around the output. Block selection only saves having to wipe out the
prompts on each line of a code block.


Duncan Murdoch-2 wrote:
> 
> 
> cls59 wrote:
>> 
>>> Even better, this behavior is somewhat universal as it works in other
>>> applications such as the Terminal. I find it particularly useful for
>>> copying
>>> code out of Vim without getting Vim's line numbers wrapped up in my
>>> selections.
>> 
> I think there's something of a culture clash here.  I consider it 
> torture to use an editor that does that.  Line numbers are part of the 
> frame around the text, they shouldn't be copied as part of the text.  (I 
> was going to say I'd never use such an editor, but that's not true: 
> sometimes I have no choice.)
> 

As for the editor debate... 

I'm not touching that one with a ten hundred foot pole :p

-Charlie

-----
Charlie Sharpsteen
Undergraduate
Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: http://www.nabble.com/productivity-tools-in-R--tp24293454p24327701.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list