[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



#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 karsten):

 Good idea to define some guidelines. Ideally, we'd even have a checkstyle
 thingy for them.

 Here's a random example from "R for Data Science", which I guess is The R
 Book that we should not ignore:

 {{{
 # Compute rate per 10,000
 table1 %>%
   mutate(rate = cases / population * 10000)

 # Compute cases per year
 table1 %>%
   count(year, wt = cases)

 # Visualise changes over time
 library(ggplot2)
 ggplot(table1, aes(year, cases)) +
   geom_line(aes(group = country), colour = "grey50") +
   geom_point(aes(colour = country))
 }}}

 https://github.com/hadley/r4ds/blob/master/tidy.Rmd

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24707#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs