A coherent coding style greatly simplifies collaborative work. This is easiest enforced by an automatic code formatter, but existing solutions to code formatting have various deficiencies. The new styler package (work in progress) aims at providing non-invasive code formatting, using the AST provided by R. So far, styler gets the spacing around operators right, but there are many more rules to be implemented. The author proposes to extend the R package styler to fully support the tidyverse style guide and make the package ready for production. The package will support formatting entire R packages, formatting entire R source trees, and checking consistent formatting. In the first place, the author wants to extend styler regarding indention. As a distinguishing feature, styler is not supposed to operate on hard-coded formatting rules, but on a set of rules that can changed to support various coding conventions.

Student

Lorenz Walthert

Mentors

  • Yihui Xie
  • Kirill Müller
close

2017