Re: [R] Block comments in R?

From: Jim Lemon <jim_at_bitwrit.com.au>
Date: Fri 06 Oct 2006 - 23:05:52 GMT


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



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 19:09:30 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 - 11:30:08 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.