A.J. Rossini
2005-Jan-07 11:03 UTC
[Rd] Any plans for commenting out region via something like " /* */ "?
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
Prof Brian Ripley
2005-Jan-07 12:03 UTC
[Rd] Any plans for commenting out region via something like " /* */ "?
On Fri, 7 Jan 2005, 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).I normally use if(FALSE) {}: I also tend to use #if 0 #endif in C code, as otherwise you have to worry about nesting of comments. We are currently working on internationalization of R, and a 2-char escape sequence doesn't look like a good idea to me. Brian -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Peter Dalgaard
2005-Jan-07 12:05 UTC
[Rd] Any plans for commenting out region via something like " /* */ "?
"A.J. Rossini" <blindglobe@gmail.com> writes:> Greetings from Switzerland! > > Are there any plans/initiatives/considerations in future versions of R > for commenting out regions via something like " /* */ "?I don't think so. Personally, I'd rather work on getting the parser to behave properly in all cases on if (FALSE){ ...lots of lines... } What did "C-c ;" do wrong anyway, Mr.ESS?> (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)....and commit to a branch or use #ifdef so that the daily package checks don't break. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
Gabor Grothendieck
2005-Jan-07 14:49 UTC
[Rd] Any plans for commenting out region via something like " /* */ "?
A.J. Rossini <blindglobe <at> gmail.com> writes: : : Greetings from Switzerland! : : Are there any plans/initiatives/considerations in future versions of R : for commenting out regions via something like " /* */ "? You could use multiline character strings. Just need to watch out for embedded quotes.
Roger D. Peng
2005-Apr-26 23:22 UTC
[Rd] Any plans for commenting out region via something like " /* */ "?
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/