[R] Random number generation

Greg Snow Greg.Snow at imail.org
Mon May 12 17:58:06 CEST 2008


> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Esmail Bonakdarian
> Sent: Sunday, May 11, 2008 7:25 AM
> To: Prof Brian Ripley
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] Random number generation

[snip]

> What I read doesn't seem to be incorrect however (it may even
> have been an archived message here), the *language* itself
> does not seem to support block *comments*. Using conditional
> constructs, or an IDE/editor to achieve similar results is a
> work around - but not the same. I don't mean to nitpick, but
> as a computer scientist I see this as different :-)

I am not a computer scientist, so correct me if I am wrong, but from what I remember (and a quick glance at my copy of Kernighan Ritchie), the C *language* itself does not support block *comments*, rather the preproccessor replaces the comments with a single space and the compilor does not even see them.

Since R is optimized for interactive use rather than compilation, running everything through a preproccessor is not really an option.  However as an additional work around you could always run your R scripts through the C preproccessor and have it strip the block comments for you.

Given the complexity of implementing block commenting (even deciding on the syntax) and the ease of current work arounds, the cost benefit ratio probably puts this very near the bottom of the priority list.


--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111



More information about the R-help mailing list