[metrics-bugs] #24707 [Metrics]: Define R coding guidelines for Metrics' products

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Mar 1 17:27:56 UTC 2018


#24707: Define R coding guidelines for Metrics' products
-------------------------+------------------------------
 Reporter:  iwakeh       |          Owner:  metrics-team
     Type:  enhancement  |         Status:  new
 Priority:  Medium       |      Milestone:
Component:  Metrics      |        Version:
 Severity:  Normal       |     Resolution:
 Keywords:               |  Actual Points:
Parent ID:               |         Points:
 Reviewer:               |        Sponsor:
-------------------------+------------------------------

Comment (by iwakeh):

 Replying to [comment:5 karsten]:

 Thanks for looking!

 > Replying to [comment:4 iwakeh]:
 > > Stumbled upon some R style guides:
 > >
 > > * [http://style.tidyverse.org/ tidyverse] has also packages supporting
 the styles.
 >
 > On first sight this looks best. I installed the `lintr` package and it
 showed me useful output.

 Yes, I think so too.  Will try the `lintr` package.

 >
 > > * [https://google.github.io/styleguide/Rguide.xml Google's R Style] on
 which many others build
 >
 > Might make sense to look into this more, because we're also using
 Google's Java style. But we need a tool.

 I think it is very terse almost seeming unfinished.

 >
 > > * [https://github.com/rdatsci/PackagesInfo/wiki/R-Style-Guide Style
 Guide by rdatsci] building on Google's and two others linked from the doc.
 >
 > The part where I stopped reading was "Assignment operator: Use = instead
 of <- for assignments." Sorry, you're out.

 True, the R-majority uses `<-`, but at least the
 [https://csgillespie.wordpress.com/2010/11/16/assignment-operators-
 in-r-vs/ link quoted there] is helpful.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24707#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the metrics-bugs mailing list