Re: [R] R programming style

2008-02-12 Thread hadley wickham
On Feb 12, 2008 9:07 AM, Terry Therneau <[EMAIL PROTECTED]> wrote: > David Scott asked > "Views on Bengtsson's ideas would interest me as well." > > I have only one serious disagreement with their suggestions > >"6.3.2 In general, the use of comments should be minimized by making the > code

Re: [R] R programming style

2008-02-12 Thread Terry Therneau
David Scott asked "Views on Bengtsson's ideas would interest me as well." I have only one serious disagreement with their suggestions "6.3.2 In general, the use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structu

Re: [R] R programming style

2008-02-11 Thread Barry Rowlingson
Roland Rau wrote: > Hi, > > I think using Emacs+ESS [1,2] is always a good starting point for a > clear layout with consistent and meaningful indentation. > > I don't know how other people think about it, but in my opinion, > "Elements of Programming Style" by Kernighan and Plauger is still an

Re: [R] R programming style

2008-02-11 Thread Roland Rau
Hi, Earl F. Glynn wrote: > Instead of using "1" or "2" in an "apply", I'll write something like this > trying for some sort of mnemonic > > apply(x, BY.ROW<-1, sum) > or > apply(z, BY.COL<-2, mean) > It think it makes sense to use those "magic numbers" in the given case. Please let me give you

Re: [R] R programming style

2008-02-11 Thread Scillieri, John
PROTECTED] On Behalf Of Earl F. Glynn Sent: Monday, February 11, 2008 2:30 PM To: [EMAIL PROTECTED] Subject: Re: [R] R programming style "David Scott" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Can anyone provide further pointers to good style? While not

Re: [R] R programming style

2008-02-11 Thread Earl F. Glynn
"David Scott" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Can anyone provide further pointers to good style? While not written for R specifically, the book "Code Complete: A Practical Handbook of Software Construction" (2nd Edition) discusses a number of good concepts for w

Re: [R] R programming style

2008-02-11 Thread Roland Rau
Hi, I think using Emacs+ESS [1,2] is always a good starting point for a clear layout with consistent and meaningful indentation. I don't know how other people think about it, but in my opinion, "Elements of Programming Style" by Kernighan and Plauger is still an interesting read -- although th

Re: [R] R programming style

2008-02-11 Thread Bernard Leemon
I just got a copy of A First Course in Statistical Programming with R by W. John Braun and Duncan J. Murdoch. Cambridge. at amazon: http://www.amazon.com/First-Course-Statistical-Programming-R/dp/0521694248/ first couple of chapters are base R that most everyone would know before wanting to pro

[R] R programming style

2008-02-11 Thread David Scott
I am aware of one (unofficial) guide to style for R programming: http://www1.maths.lth.se/help/R/RCC/ from Henrik Bengtsson. Can anyone provide further pointers to good style? Views on Bengtsson's ideas would interest me as well. David Scott __