Re: [R] Block comments in R?

From: Robin Hankin <>
Date: Thu 05 Oct 2006 - 09:24:48 GMT

On 5 Oct 2006, at 10:05, Uwe Ligges wrote:

> Wee-Jin Goh wrote:
>> Hello list,
>> Is there any way to perform a block comment in R? In C++, anything in
>> between a /* and */ is considered a comment, and it allows
>> programmers to comment out chunks of code for testing and debugging.
>> Is there such a feature in R?
> This has frequently been asked on the list. Try to google for it. You
> will find answers like
> if(FALSE){"
> code block
> commented
> "}

That method doesn't work for me:






returns an error. How would I comment out that block of (incorrect) code?

> or "use a good editor that supports commenting and uncommenting
> blocks".
> Uwe Ligges

Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu Oct 05 19:29:49 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 Thu 05 Oct 2006 - 10:30:08 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.