cli_rule {cli} | R Documentation |
It can be used to separate parts of the output.
cli_rule(
left = "",
center = "",
right = "",
id = NULL,
.envir = parent.frame()
)
left |
Label to show on the left. It interferes with the |
center |
Label to show at the center. It interferes with the
|
right |
Label to show on the right. It interferes with the |
id |
Element id, a string. If |
.envir |
Environment to evaluate the glue expressions in. |
pkg <- "mypackage" cli_rule(left = "{.pkg {pkg}} results")
The line style of the rule can be changed via the the line-type
property. Possible values are:
"single"
: (same as 1
), a single line,
"double"
: (same as 2
), a double line,
"bar1"
, "bar2"
, "bar3"
, etc., "bar8"
uses varying height bars.
Colors and background colors can similarly changed via a theme.
d <- cli_div(theme = list(rule = list( color = "cyan", "line-type" = "double"))) cli_rule("Summary", right = "{.pkg mypackage}") cli_end(d)