View source: R/rbitr_helpers.R
add_spaces | R Documentation |
Justify table columns by adding spaces.
add_spaces(my_text, to)
my_text |
A character vector of text to be justified. |
to |
A single-element character vector with allowed values of either 'head' or 'tail' to indicate on which side spaces should be added. |
The function add_spaces()
is used to make justified tables with a
monospaced font. The parameter my_text
should contain a vector of text
for a single column, with each row as a separate element. For right-
justified text, set the to
parameter to 'head'. This will add enough
space to the front of each row to make all entries have an equal number of
characters. Similarly, for left-justified text, set the to
parameter to
'tail'.
A character vector of text with spaces added to give each entry an equal number of characters.
add_spaces(c('a', 'b', 'cccc'), to = 'tail')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.