[R] open source and R

Jari Oksanen jarioksa at sun3.oulu.fi
Tue Nov 15 11:25:17 CET 2005


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




More information about the R-help mailing list