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
)Integer. Maximum width (in characters) of the step label
before it wraps to the next line. Default: 32.
Character. Thousands separator used when formatting counts.
Default: " " (thin space). Use "," for English convention or ""
to disable.
Character. Display language for the metrics line. One of
"en" (default) or "fr".
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.
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).
%>=%(), pipe_log
# 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)