strcenter | R Documentation |
strcenter
adds char
to the left and right of x
to make its length n
.
strrjust
adds char
to the left.
strljust
adds char
to the right.
strcenter(x, n = 1, char = " ", type = "c")
strrjust(x, n = 1, char = " ", type = "c")
strljust(x, n = 1, char = " ", type = "c")
x |
character vector. |
n |
numeric vector for the widths of the output. The first number is used for the first string in |
char |
character string or vector of 1-characters for padding characters. The first character is used for the first string in |
type |
character string: partial matching to one of |
Character vector.
strrjust("hello", 10)
strljust("hello", 10)
strcenter("hello", 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.