[R] Google's R Style Guide
vitosmail at rambler.ru
Mon Aug 31 15:55:21 CEST 2009
On Fri, 28 Aug 2009 16:40:53 +0200, Kevin Wright <kw.stat at gmail.com> wrote:
> On Fri, Aug 28, 2009 at 8:22 AM, Ted Harding
> <Ted.Harding at manchester.ac.uk>wrote:
>> On 28-Aug-09 12:59:24, Esmail wrote:
>> > Perhaps most of you have already seen this?
>> > http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
>> > Comments/Critiques?
>> > Thanks,
>> > Esmail
>> > ps: Reminds me of PEP 8 for Python
>> > http://www.python.org/dev/peps/pep-0008/
>> > Maybe not that surprising since Python is also one of the main
>> > languages used by Google.
>> I think it is grossly over-prescriptive. For example:
>> "function names have initial capital letters and no dots"
>> is violated throughout R itself.
> Certainly R's function names are an inconsistent mess:
> row.names, rownames
> browseURL, contrib.url, fixup.package.URLs
> package.contents, packageStatus
> mahalanobis, TukeyHSD
> getMethod, getS3method
> It's too late to fix the established functions, but it would be nice to
> more reliable and sensible standards going forward into the future.
It's never too late - it's only a name not a code - search replace
through the whole R code and have old names deprecated is not a big deal,
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help