Use this styler for formatting code by setting this as an option:
options(styler.addins_style_transformer = "certe_style_transformer()")
Then use the keyboard shortcut of the styler
package to apply the formatting.
certe_style_transformer(...)
arguments passed on to styler::tidyverse_style()
The Certe styler keeps the first argument of a function on the same line, puts all following arguments on a new line, and does not add another new line after the last argument. This makes these lines:
example_isolates %>% count(hospital_id, gender) %>% plot2(x.title = "Hospital", y.title = "Count", title = "Count isolates per hospital/gender")
example_isolates %>%
count(hospital_id, gender) %>%
plot2(x.title = "Hospital", y.title = "Count", title = "Count isolates per hospital/gender")
Change into: