[R] Block comments in R?
Jim Lemon
jim at bitwrit.com.au
Sat Oct 7 01:05:52 CEST 2006
And of course for NEdit, all one needs to do is select:
Preferences | Default Settings | Customize menus | Macro Menu
Then select the "New" option at the top of the menu list,
Give it a name (I call this r_comment),
Enter the following code:
replace_in_selection("^","#","regex")
click on "Apply" and then "OK"
You will have an item named "r_comment" on your macro menu
Simply select the area you wish to comment out and run the macro.
To remove comments, you can program another macro (r_nocomment)
replace_in_selection("#","")
You can give both of these a keystroke invocation if you wish.
Happy commenting!
Jim
More information about the R-help
mailing list