tidyverse / style

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

Add "# Good" for unnamed arguments on long lines #207

Closed johann-wagner closed 1 month ago

johann-wagner commented 1 year ago

Most other code chunks in the section include a comment indicating which part is # Good and # Bad. Currently, the current code chunk is as follows:

map(x, f,
    extra_argument_a = 10,
    extra_argument_b = c(1, 43, 390, 210209)
)

Whilst the code chunk only includes one section of code, I think for consistency and clarity, it would assist in having the # Good comment clearly indicate that this is an example of good coding syntax.

# Good
map(x, f,
    extra_argument_a = 10,
    extra_argument_b = c(1, 43, 390, 210209)
)
hadley commented 1 month ago

This example is going to go away as part of fixing #189.