Configure the behaviour of the %>=% pipe. Call with named arguments to set options, or with no arguments to return current values.

logrittr_options(
  wrap_width = NULL,
  big_mark = NULL,
  lang = NULL,
  max_cols = NULL
)

Arguments

wrap_width

Integer. Maximum width (in characters) of the step label before it wraps to the next line. Default: 32.

big_mark

Character. Thousands separator used when formatting counts. Default: " " (thin space). Use "," for English convention or "" to disable.

lang

Character. Display language for the metrics line. One of "en" (default) or "fr".

max_cols

Integer. Maximum number of column names to display in the added/dropped lines. If there are more, the first max_cols are shown followed by "and N others". Default: 5. Use Inf to always show all columns.

Value

Invisibly returns the previous values of any option that was changed, as a named list. When called with no arguments, returns all current options as a named list (visibly).

See also

%>=%(), pipe_log

Examples

# French defaults
logrittr_options()
#> $wrap_width
#> [1] 32
#> 
#> $big_mark
#> [1] " "
#> 
#> $lang
#> [1] "en"
#> 
#> $max_cols
#> [1] 5
#> 

# Switch to English, comma thousands separator, show up to 3 col names
logrittr_options(lang = "en", big_mark = ",", max_cols = 3)

# Reset to defaults
logrittr_options(wrap_width = 32, big_mark = " ", lang = "en", max_cols = 5)