Re: [R] Block comments in R?

From: Stefano Calza <stecalza_at_tiscali.it>
Date: Fri 06 Oct 2006 - 10:55:38 GMT

And of course in emacs you can select the region to comment then hit Ctrl-x r t and type #: all the lines in that region will have a # at the beginnig

To uncomment Ctrl-x r d

Stefano

On Fri, Oct 06, 2006 at 07:05:52PM -0400, Jim Lemon wrote:
<Jim>And of course for NEdit, all one needs to do is select:
<Jim>
<Jim>Preferences | Default Settings | Customize menus | Macro Menu
<Jim>
<Jim>Then select the "New" option at the top of the menu list,
<Jim>
<Jim>Give it a name (I call this r_comment),
<Jim>
<Jim>Enter the following code:
<Jim>
<Jim>replace_in_selection("^","#","regex")
<Jim>
<Jim>click on "Apply" and then "OK"
<Jim>
<Jim>You will have an item named "r_comment" on your macro menu
<Jim>
<Jim>Simply select the area you wish to comment out and run the macro.
<Jim>
<Jim>To remove comments, you can program another macro (r_nocomment)
<Jim>
<Jim>replace_in_selection("#","")
<Jim>
<Jim>You can give both of these a keystroke invocation if you wish.
<Jim>
<Jim>Happy commenting!
<Jim>
<Jim>Jim
<Jim>
<Jim>______________________________________________
<Jim>R-help@stat.math.ethz.ch mailing list
<Jim>https://stat.ethz.ch/mailman/listinfo/r-help
<Jim>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
<Jim>and provide commented, minimal, self-contained, reproducible code.



R-help@stat.math.ethz.ch 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. Received on Fri Oct 06 21:00:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 06 Oct 2006 - 12:30:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.