Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread PO SU
Tks for all your help,  finally i choose the way in Rstudio ctrl+shift+C, and do twice to cancel those comments. It's enough for me now. BTW, I also like the way: if(FALSE) {}   :) -- PO SU mail: desolato...@163.com Majored in Statistics from SJTU At 2014-09-10 02:15:49, "Gjalt-Jorn Pe

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Sven E. Templer
One way I know to do this is (in bash) to use a dummy variable and make the comment a multiline character string: dummy <- c(" This is my multiline comment or code block. ") or if printing does not disturb you, just use: " ... " Use ' if you have " in the block. Other workarounds are here, whic

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Gjalt-Jorn Peters
In R-studio, you can also select whatever you want to comment out, and press CTRL-SHIFT-C to comment the selection in one go. To uncomment it all in one go again, you can select it again and press CTRL-SHIFT-C again. Gjalt-Jorn On 2014-09-09 5:51, Pascal Oettli wrote: A workaround is to escap

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Bos, Roger
-- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of PO SU Sent: Monday, September 08, 2014 10:50 PM To: R. Help Subject: [R] How to use multi paragraph comment like /* and */ in cpp? Dear expeRts, I find it's terrible when i want to comment multi par

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Martin Maechler
> "PS" == PO SU > on Tue, 9 Sep 2014 10:49:32 +0800 writes: PS> Dear expeRts,    I find it's terrible  when  i want to PS> comment multi paragraph (e.g.  a 30 lines function) , i PS> have to comment each line with #,  is there any good way PS> to do that ?    I invest

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Duncan Murdoch
On 08/09/2014, 11:14 PM, Jeff Newmiller wrote: > There are no multi line comment markers in R. However, since you are always > referring to RStudio you might want to look into roxygen, since their editor > supports that tool. RStudio has a command to comment a block: it's in the Code menu. (On

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Pascal Oettli
No I don't mean this. Did you at least try the small example I provided? On Tue, Sep 9, 2014 at 3:25 PM, PO SU wrote: > > > I don't understand what's your meaning, do you mean that i should do some > file processing,(like writing a script) ,so that i could add # in any line i > wanted. > I thi

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Berend Hasselman
On 09-09-2014, at 08:25, PO SU wrote: > > > I don't understand what's your meaning, do you mean that i should do some > file processing,(like writing a script) ,so that i could add # in any line i > wanted. > I think it is not convenient. > And, it does seems that there is no way to multi

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-08 Thread PO SU
I don't understand what's your meaning, do you mean that i should do some file processing,(like writing a script) ,so that i could add # in any line  i wanted. I think it is not convenient. And, it does seems that there is no way to multi line comment in R. But when i turn to using Rstudio, a

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-08 Thread Pascal Oettli
A workaround is to escape the evaluation of the lines. For example: tt <- 0 while(tt > 0){ cat('rr\n') } Regards, Pascal On Tue, Sep 9, 2014 at 11:49 AM, PO SU wrote: > > Dear expeRts, >I find it's terrible when i want to comment multi paragraph (e.g. a 30 > lines function) , i have t

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-08 Thread Jeff Newmiller
There are no multi line comment markers in R. However, since you are always referring to RStudio you might want to look into roxygen, since their editor supports that tool. I would also suggest making more functions that are smaller. --

[R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-08 Thread PO SU
Dear expeRts,    I find it's terrible  when  i want to comment multi paragraph (e.g.  a 30 lines function) , i have to comment each line with #,  is there any good way to do that ?    I investgate it, but found no easy way, may you help me ? -- PO SU mail: desolato...@163.com Majored in S