Re: [R] R Commenting Style

From: Martin Maechler <>
Date: Fri 20 Jan 2006 - 03:20:53 EST

>>>>> "Kevin" == Kevin E Thorpe <> >>>>> on Thu, 19 Jan 2006 06:26:31 -0500 writes:

    Kevin> I don't know if this is what you're referring to, but in ESS the number 
    Kevin> of octothorpes (#) affects the indentation in the emacs buffer. If I 
    Kevin> remember right, ### puts it at the beginning of the line, ## the current 
    Kevin> indentation level (eg. in a function) and # further right.

That's correct, thank you, Kevin,
and it's further supported by ESS in emacs, e.g., if you comment a region (M-;) two "#" are used automatically.

There's also a little not well-known function  M-x ess-fix-comments
with documentation string
 "Fix ess-mode buffer so that single-line comments start with at least `##'." and ess-fix-comments is implicitly called by the function   M-x ess-MM-fix-src
which I use all the time when I get source files from some people in order to ``clean them'' to my taste...

Note that a current (development) version of the ESS manual is also only at the ESS website,
specifically, where the section on indenting (and the comments) is

I have exceptionally broken the rule of crossposting, and am sending this to ESS-help mailing list as well, just to make sure it'll be seen (and found) there as well.

Martin Maechler, ETH Zurich

    Kevin> Paul Roebuck wrote:

>> I seem to remember reading somewhere about some style
>> guide regarding R the number of comment characters (#)
>> prior to the comment meaning something.
>> Anyone know to what I'm referring? Where? mailing list PLEASE do read the posting guide! Received on Fri Jan 20 03:34:25 2006

This archive was generated by hypermail 2.1.8 : Fri 20 Jan 2006 - 06:10:17 EST