What editor are you all using to write R code? Many will have ways of doing what you want, e.g., comment-region (bound by default to M-; through comment-dwim) in Emacs.
-----Original Message----- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Michael Knudsen Sent: Wednesday, July 22, 2009 9:55 AM To: Mark Knecht Cc: r-help Subject: Re: [R] Multi-line comments? On Wed, Jul 22, 2009 at 4:30 PM, Mark Knecht<markkne...@gmail.com> wrote: > I wanted to comment out 20 lines that I'm moving to a function but > didn't want to delete them. Is there no defined way to get around > using a # on each of the 20 lines? Just like you, I have been longing for that myself. It seems that the answer is negative, so I have ended up using if (1==0) { # code goes here } although is not really nice to look at. -- Michael Knudsen micknud...@gmail.com http://lifeofknudsen.blogspot.com/ ______________________________________________ R-help@r-project.org 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. ______________________________________________ R-help@r-project.org 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.