[R] Random number generation

Esmail Bonakdarian esmail.js at gmail.com
Sun May 11 15:25:04 CEST 2008


Hello there,

Prof Brian Ripley wrote:
> On Sun, 11 May 2008, Esmail Bonakdarian wrote:
> 
>> Stephan Kolassa wrote:
>>>
>>> Have you tried successively removing/commenting parts of the script 
>>> before the sample() command until the problem goes away? That way you 
>>> should be able to pinpoint the offending script command.
>>
>> Hi,
>>
>> This brings up a question I have .. is there a way to do *block* comments
>> with scripts? A la /* ... */ like it's done in Java or C/C++? Ie comment
>> more than just one line at a time.
>>
>> From what I have read this is not possible in R (at least not easily), 
>> but
>> I am eager for someone to contradict me :-)
> 
> if(FALSE) {
> ...
> }
> 
> Any good editor can do block commenting, e.g. ESS.
> 
> You didn't tell us what you read, but I have never seen this in a 
> reputable source.

I don't remember the source as I was reading widely all over the place
trying to get up to speed with R in a hurry  (having found this group
was one of the best sources).

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'll have to look at ESS though.

Thanks,
Esmail

ps: Ah, I seem Meta-; works as a toggle in emacs/ESS .. thanks for encouraging
     me to look at that some more.



More information about the R-help mailing list