Why not if ( 0 ) { commented with zero } else { commented with one }
Greg Snow-2 wrote: > > I believe that #if lines for C++ programs is handled by the preprocessor, > not the compiler. So if you want the same functionality for R programs, > it would make sense to just preprocess the R file. > >> In C++, I can use the following construct to choice either of the two >> blocks the comment but not both. Depending on whether the number after >> "#if" is zero or not, the commented block can be chose. I'm wondering >> if such thing is possible in R? >> >> #if 0 >> commented with 0 >> #else >> commented with 1 >> #endif >> >> Regards, >> Peng >> > -- View this message in context: http://www.nabble.com/Is-there-a-construct-for-conditional-comment--tp25034224p25064798.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.