From rpeng at jhsph.edu  Tue Apr 26 23:22:42 2005
From: rpeng at jhsph.edu (Roger D. Peng)
Date: Tue Apr 26 23:22:51 2005
Subject: [Rd] Any plans for commenting out region via something like "
	/* */	"?
In-Reply-To: <1abe3fa905010702034c2e2799@mail.gmail.com>
References: <1abe3fa905010702034c2e2799@mail.gmail.com>
Message-ID: <426EB122.2010801@jhsph.edu>

I realize this thread is a bit old, but it only just came to my 
mind.  What about using a function like

commentOut <- function(expr) { invisible() }

and then

commentOut({
	a <- 10
	bladfkljasdlkfj()
	blah blah blah
})

Lazy evaluation prevents the expression from being evaluated so 
you don't have to worry about syntatic correctness.  And it nests 
too (I believe).

Belated US$0.02.

-roger

A.J. Rossini wrote:
> Greetings from Switzerland!
> 
> Are there any plans/initiatives/considerations in future versions of R
> for commenting out regions via something like " /*    */  "?
> 
> (I've got an application for which something like that would be
> useful; if not, there are less simple solutions).
> 
> best,
> -tony
> 
> "Commit early,commit often, and commit in a repository from which we can easily
> roll-back your mistakes" (AJR, 4Jan05).
> 
> A.J. Rossini
> blindglobe@gmail.com
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 

-- 
Roger D. Peng
http://www.biostat.jhsph.edu/~rpeng/


[Rd] Any plans for commenting out region via something like " /* */ "?
Roger D. Peng