certe_style_transformer: Syntax Format According to Certe Coding Guidelines

View source: R/styler.R

certe_style_transformerR Documentation

Syntax Format According to Certe Coding Guidelines

Description

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.

Usage

certe_style_transformer(...)

Arguments

...

arguments passed on to styler::tidyverse_style()

Details

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:

example_isolates %>%
  count(hospital_id,
        gender) %>%
  plot2(x.title = "Hospital",
        y.title = "Count",
        title = "Count isolates per hospital/gender")

certe-medical-epidemiology/certestyle documentation built on July 12, 2024, 2:45 p.m.