Description Usage Arguments Details Value See Also Examples
This function helps with multi-column output of ANSI styles strings.
It works well together with boxx()
, see the example below.
1 2 3 4 5 6 7 8 9 10 | ansi_columns(
text,
width = console_width(),
sep = " ",
fill = c("rows", "cols"),
max_cols = 4,
align = c("left", "center", "right"),
type = "width",
ellipsis = symbol$ellipsis
)
|
text |
Character vector to format. Each element will formatted as a cell of a table. |
width |
Width of the screen. |
sep |
Separator between the columns. It may have ANSI styles. |
fill |
Whether to fill the columns row-wise or column-wise. |
max_cols |
Maximum number of columns to use. Will not use more, even if there is space for it. |
align |
Alignment within the columns. |
type |
Passed to |
ellipsis |
The string to append to truncated strings. Supply an empty string if you don't want a marker. |
If a string does not fit into the specified width
, it will be
truncated using ansi_strtrim()
.
ANSI string vector.
Other ANSI string operations:
ansi_align()
,
ansi_nchar()
,
ansi_strsplit()
,
ansi_strtrim()
,
ansi_strwrap()
,
ansi_substring()
,
ansi_substr()
,
ansi_toupper()
,
ansi_trimws()
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.