tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-in.R

call(
  2,
  3
)

switch(
  x,
  a = 2,
  y = 3
)


switch( #
  x,
  a = 2,
  y = 3
)



switch(
  x,
  a = 2, #


  y = 3
)


switch(
       x,a = 2,
       y = 3
)

switch(x,a = 2,
  y = 3
)

switch(x,a = 2, y = 3)

switch(x,a = 2, y = 3
) #

switch(x,a = 2, y = 3 #
)

if_else(a,
  c, v
)

ifelse(x,
  y, z
)


# namespacing
base::switch(f,
             x = 2,
             y = 3
)

base::switch(
  f,
             x = 2,
             y = 3
)

dplyr::ifelse(x,
              1, 32
)

dplyr::ifelse(
  x,
              1, 32
)

# variable name 'switch' is different
l$switch[1:3, ]
krlmlr/styler documentation built on June 14, 2025, 3:19 p.m.