Closed
Description
The tidyverse
style guide mentions:
Although it doesn't explicitly recommend that when the function definition looks like the following, there should be one argument per line to improve readability, but I am guessing that this is something implicitly being hinted at? Not sure.
styler::style_text(
'
foo <- function(posteriors, centrality = "median", dispersion = FALSE, ci = 0.89, ci_method = "hdi", test = c("p_direction", "rope"), rope_range = "default", rope_ci = 0.89, component = c("all", "conditional", "location"), parameters = NULL, ...) {}
'
)
#>
#> foo <- function(posteriors, centrality = "median", dispersion = FALSE, ci = 0.89, ci_method = "hdi", test = c("p_direction", "rope"), rope_range = "default", rope_ci = 0.89, component = c("all", "conditional", "location"), parameters = NULL, ...) {}
Nevertheless, I was wondering if you think this (styling to one argument per line) is something that styler
should be doing by default? Of course, it might not make sense to do this when there are only a few (3-4?) arguments present, but would have increasing utility the more arguments are present.