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
)

Try the styler package in your browser

Any scripts or data that you put into this service are public.

styler documentation built on Aug. 29, 2023, 5:10 p.m.