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

Roger D. Peng rpeng at jhsph.edu
Tue Apr 26 23:22:42 CEST 2005

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

	a <- 10
	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.


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 at gmail.com
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

Roger D. Peng

More information about the R-devel mailing list