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
______________________________________________
[email protected] 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.