On Tue, 2005-11-15 at 09:54 +0000, Barry Rowlingson wrote:
> Liaw, Andy wrote:
> > However code readability can not be over-emphasized.  I must admit to have
> > written R code in such a supposedly `clever' way that I can't figure out
> > what I was trying to do (or how I did it) a week later...
> 
>   The solution to that is to make sure this sort of code is adequately 
> commented! Be as clever as you like - make your R look like a runner-up 
> in the obfuscated perl programming contest if you want - but a 
> well-placed comment will hopefully prevent that stupid feeling a week later.
> 
Unfortunately the comments don't stick well with the R code. They would
if you always edit the source code, but not with my preferred toolbox.
For me the most natural way to work on a function is to install the
package with the function, and then use Emacs+ESS to edit, test and
debug the the function within an R session. That really ruins all decent
commenting: comments may be misplaced, and the default formatting of
comments is really bad in ESS. So my choice is to uncomment R code, but
comment C (and Fortran).

cheers, jari oksanen

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to