tidyverse / style

The tidyverse style guide for R code
https://style.tidyverse.org
Other
298 stars 104 forks source link

Recommendations for vertical whitespace #185

Closed MichaelChirico closed 1 month ago

MichaelChirico commented 2 years ago

Currently, the guide is silent on any recommendations re: vertical whitespace. Google's C++ guide has several recommendations:

https://google.github.io/styleguide/cppguide.html#Vertical_Whitespace

Most of it is relevant to R; is it worthwhile to call out any rules here?

hadley commented 2 months ago

Yeah, I like that advice.

One idea that I've been noodling on is "paragraphs" of code, i.e. you want to keep related thoughts together in one contiguous block, and then you when you start a new thought, you add a gap. But I don't know how to make the precise enough to be useful to other people.